[WSIFException]:invoking service method
"rizwan patel" <[email protected]> Sat, 26 Jan 2008 22:54:17 +0530
| Newsgroups | gmane.comp.apache.webservices.wsif.user |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_6286_3027566.1201368257928
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Please help me out. I have to invoke the web services dynamically. I gone
thru the WSIF concepts and it will be helpful for me to invoke the services
with this framework. I had written webservice "HelloWorld" and also
generated the client code for that in WSIF but i am not succeded in invoking
the webservice.
Please help me to come out of this problem it is on urgent priority as i
have to give the presentation on dynamic invocation.
Your help is very worth valuable for me.The detail is as below.
I am sending you the complete details such as WSDL, Client code ,Output, and
also the web-service method server side.
I had deploy the HelloWorld.aar file into jakarta-tomcat-5.
The location of service is :
http://<localhost>:8080/axis2/services/listServices
Service code :
*HelloInterface.java*
package hello;
public interface HelloInterface
{
public int sayHello(java.lang.String str_1);
}
*HelloWorld.java*
package hello;
public class HelloWorld implements HelloInterface, java.rmi.Remote
{
public int sayHello(java.lang.String str_1)
{
System.out.println("Welcome in HelloWorld :"+str_1);
return 10;
}
}
*Service.xml :*
<service name="HelloWorld" scope="application" targetNamespace="http://hello
">
<description>
Say Hello
</description>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
<schema schemaNamespace="http://hello/xsd"/ <http://hello/xsd%22/>>
<parameter name="ServiceClass">hello.HelloWorld</parameter>
</service>
*build.xml*
<project basedir="." default="generate.service">
<property environment="env"/>
<property name="AXIS2_HOME" value="${env.AXIS2_HOME}"/>
<property name="build.dir" value="build"/>
<path id="axis2.classpath">
<fileset dir="${AXIS2_HOME}/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="compile.service">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dir}/classes"/>
<!--First let's compile the classes-->
<javac debug="on"
fork="true"
destdir="${build.dir}/classes"
srcdir="${basedir}/src"
classpathref="axis2.classpath">
</javac>
</target>
<target name="generate.wsdl" depends="compile.service">
<taskdef name="java2wsdl"
classname="org.apache.ws.java2wsdl.Java2WSDLTask"
classpathref="axis2.classpath"/>
<java2wsdl className="hello.HelloWorld"
outputLocation="${build.dir}"
targetNamespace="http://hello"
schemaTargetNamespace="http://hello/xsd">
<classpath>
<pathelement path="${axis2.classpath}"/>
<pathelement location="${build.dir}/classes"/>
</classpath>
</java2wsdl>
</target>
<target name="generate.service" depends="compile.service">
<!--aar them up -->
<copy toDir="${build.dir}/classes" failonerror="false">
<fileset dir="${basedir}/resources">
<include name="**/*.xml"/>
</fileset>
</copy>
<jar destfile="${build.dir}/HelloWorld.aar">
<fileset excludes="**/Test.class" dir="${build.dir}/classes"/>
</jar>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
</project>
*HelloWorld.wsdl*
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:axis2="http://hello" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:ns0="http://hello/xsd" xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="
http://org.apache.axis2/xsd" xmlns:wsaw="
http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="
http://www.w3.org/2001/XMLSchema" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://hello">
<wsdl:types>
<xs:schema xmlns:xsd="http://hello/xsd" targetNamespace="
http://hello/xsd" attributeFormDefault="qualified"
elementFormDefault="qualified">
<xs:element name="sayHello">
<xs:complexType>
<xs:sequence>
<xs:element name="str_1" minOccurs="0"
type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="sayHelloResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" minOccurs="0"
type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="sayHelloRequest">
<wsdl:part name="parameters" element="ns0:sayHello"/>
</wsdl:message>
<wsdl:message name="sayHelloResponse">
<wsdl:part name="parameters" element="ns0:sayHelloResponse"/>
</wsdl:message>
<wsdl:portType name="HelloWorldPortType">
<wsdl:operation name="sayHello">
<wsdl:input message="axis2:sayHelloRequest"
wsaw:Action="urn:sayHello"/>
<wsdl:output message="axis2:sayHelloResponse"
wsaw:Action="urn:sayHelloResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloWorldSOAP11Binding"
type="axis2:HelloWorldPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<wsdl:operation name="sayHello">
<soap:operation soapAction="urn:sayHello" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="HelloWorldSOAP12Binding"
type="axis2:HelloWorldPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<wsdl:operation name="sayHello">
<soap12:operation soapAction="urn:sayHello" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="HelloWorldHttpBinding"
type="axis2:HelloWorldPortType">
<http:binding verb="POST"/>
<wsdl:operation name="sayHello">
<http:operation location="HelloWorld/sayHello"/>
<wsdl:input>
<mime:content type="text/xml" part="sayHello"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="sayHello"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloWorld">
<wsdl:port name="HelloWorldSOAP11port_http"
binding="axis2:HelloWorldSOAP11Binding">
<soap:address location="
http://localhost:8080/axis2/services/HelloWorld"/<http://localhost:8080/axis2/services/HelloWorld%22/>
>
</wsdl:port>
<wsdl:port name="HelloWorldSOAP12port_http"
binding="axis2:HelloWorldSOAP12Binding">
<soap12:address location="
http://localhost:8080/axis2/services/HelloWorld"/<http://localhost:8080/axis2/services/HelloWorld%22/>
>
</wsdl:port>
<wsdl:port name="HelloWorldHttpport"
binding="axis2:HelloWorldHttpBinding">
<http:address location="
http://localhost:8080/axis2/services/HelloWorld"/<http://localhost:8080/axis2/services/HelloWorld%22/>
>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
*xsd file is* :
*-* <http://localhost:8080/axis2/services/HelloWorld?xsd#> <xs:schema
attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://hello/xsd" xmlns:axis2="http://hello" xmlns:ns="
http://hello/xsd" xmlns:ns0="http://hello/xsd" xmlns:ns1="
http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="sayHello">
- <xs:complexType>
- <xs:sequence>
<xs:element name="str_1" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="sayHelloResponse">
- <xs:complexType>
- <xs:sequence>
<xs:element name="return" nillable="true" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
*And my client side code is : client is developed using eclips 3.1 *
**
*HelloWorld.java*
import java.util.Iterator;
import org.apache.wsif.WSIFMessage;
import org.apache.wsif.WSIFOperation;
import org.apache.wsif.WSIFPort;
import org.apache.wsif.WSIFService;
import org.apache.wsif.WSIFServiceFactory;
import javax.xml.namespace.QName;
public class HelloWorld {
/**
* @param args
*
*/
public static void main(String[] args) throws Exception {
System.out.println("Start -- 1");
String str1="Rizwan";
WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
String wsdlloc="http://localhost:8080/axis2/services/HelloWorld?wsdl";
System.out.println(" -- 2 --");
WSIFService service = factory.getService(wsdlloc,null,null ,"
http://hello","HelloWorldPortType");
service.mapType(new QName("
http://hello/xsd","HelloWorld"),Class.forName("clientsidecode.HelloClient.HelloWorld<http://hello/xsd%22,%22HelloWorld%22),Class.forName(%22clientsidecode.HelloClient.HelloWorld>
"));
WSIFPort port = service.getPort("HelloWorldSOAP11port_http");
System.out.println("-- 3--");
WSIFOperation operation=port.createOperation("sayHello");
WSIFMessage input = operation.createInputMessage("str_1");
WSIFMessage output =operation.createOutputMessage();
WSIFMessage fault = operation.createFaultMessage();
input.setObjectPart("str_1",str1);
String str_2="Hi";
System.out.println("Input Message"+input);
System.out.println("Input parts : "+input.getObjectPart("str_1"));
//input.setObjectPart("part1",str_2);
if(operation.executeRequestResponseOperation(input,output,fault))
{
System.out.println("Result : "+output.getIntPart("return"));
}
// TODO Auto-generated method stub
System.out.println("End");
}
}
All the pre-required jar of the WSIF are being installed.
When i run the client the following error occured. Please suggest me where
will be the exact problem is.
*OUTPUT :*
Start -- 1
Exception in thread "main"
*org.apache.wsif.WSIFException*: exception on AXIS invoke: Exception
occurred while trying to invoke service method sayHello; nested exception
is:
Exception occurred while trying to invoke service method sayHello
at
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.invokeAXISDocStyle(Unknown
Source)
-- 2 --
- WSIF0006W: Multiple WSIFProvider found supporting the same namespace URI '
http://schemas.xmlsoap.org/wsdl/soap/'. Found ('
org.apache.wsif.providers.soap.apacheaxis.WSIFDynamicProvider_ApacheAxis,
org.apache.wsif.providers.soap.apachesoap.WSIFDynamicProvider_ApacheSOAP')
- WSIF0007I: Using WSIFProvider '
org.apache.wsif.providers.soap.apacheaxis.WSIFDynamicProvider_ApacheAxis'
for namespaceURI 'http://schemas.xmlsoap.org/wsdl/soap/'
-- 3--
Input Messageorg.apache.wsif.base.WSIFDefaultMessage@c2a132 name:str_1
Input parts : Rizwan
at
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.invokeRequestResponseOperation(Unknown
Source)
at
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.executeRequestResponseOperation(Unknown
Source)
at clientsidecode.HelloClient.HelloWorld.main(
*HelloWorld.java:41*)
Caused by: Exception occurred while trying to invoke service method sayHello
at org.apache.axis.message.SOAPFaultBuilder.endElement(
*SOAPFaultBuilder.java:135*)
at org.apache.axis.encoding.DeserializationContextImpl.endElement(
*DeserializationContextImpl.java:942*)
at org.apache.crimson.parser.Parser2.maybeElement(
*Parser2.java:1528*)
at org.apache.crimson.parser.Parser2.content(
*Parser2.java:1779*)
at org.apache.crimson.parser.Parser2.maybeElement(
*Parser2.java:1507*)
at org.apache.crimson.parser.Parser2.content(
*Parser2.java:1779*)
at org.apache.crimson.parser.Parser2.maybeElement(
*Parser2.java:1507*)
at org.apache.crimson.parser.Parser2.parseInternal(
*Parser2.java:500*)
at org.apache.crimson.parser.Parser2.parse(
*Parser2.java:305*)
at org.apache.crimson.parser.XMLReaderImpl.parse(
*XMLReaderImpl.java:442*)
at javax.xml.parsers.SAXParser.parse(
*SAXParser.java:375*)
at org.apache.axis.encoding.DeserializationContextImpl.parse(
*DeserializationContextImpl.java:232*)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(
*SOAPPart.java:546*)
at org.apache.axis.Message.getSOAPEnvelope(
*Message.java:377*)
at org.apache.axis.client.Call.invokeEngine(
*Call.java:2132*)
at org.apache.axis.client.Call.invoke(
*Call.java:2102*)
at org.apache.axis.client.Call.invoke(
*Call.java:1851*)
at org.apache.axis.client.Call.invoke(
*Call.java:1777*)
at org.apache.axis.client.Call.invoke(
*Call.java:1315*)
... 4 more
------=_Part_6286_3027566.1201368257928
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
<br><font size=3D"2">
<div>Please help me out. I have to invoke the web services dynamically. I g=
one thru the WSIF concepts and it will be helpful for me to invoke the serv=
ices with this framework. I had written webservice "He=
lloWorld" and also generated the client code for that in WSIF but i am=
not succeded in invoking the webservice.</div>
<div>Please help me to come out of this problem it is on urgent priority as=
i have to give the presentation on dynamic invocation.</div>
<div>Your help is very worth valuable for me.The detail=
is as below.</div>
<div>I am sending you the complete details such as WSDL, Client code ,Outpu=
t, and also the web-service method server side.</div>
<div>I had deploy the HelloWorld.aar file into jakarta-tomcat-5.</div>
<div>The location of service is : <a>http://<localhost>:8080/ax=
is2/services/listServices</a> </div>
<div>Service code : </div>
<div><strong>HelloInterface.java</strong></div>
<div> </div>
<div>package hello;<br>public interface HelloInterface<br>{<br> public=
int sayHello(java.lang.String str_1);<br>}</div>
<div>
<p><strong>HelloWorld.java</strong></p>
<p>package hello;</p>
<p>public class HelloWorld implements HelloInterface, java.rmi.Remote<br>{<=
br> public int sayHello(java.lang.String str_1)<br> {<br> &n=
bsp;System.out.println("Welcome in HelloWorld :"+str_1);<br> =
; return 10;<br> }</p>
<p>}</p>
<p><strong>Service.xml :</strong></p>
<p><service name=3D"HelloWorld" scope=3D"application"=
; targetNamespace=3D"<a onclick=3D"return top.js.OpenExtLink(window,ev=
ent,this)" href=3D"http://hello/" target=3D"_blank">http://hello</a>"&=
gt;<br>
<description><br> &nb=
sp; Say Hello<br> </description><br> &nb=
sp; <messageReceivers><br> =
<messageReceiver mep=3D"<a onclick=3D"return top.js.OpenExtLink(win=
dow,event,this)" href=3D"http://www.w3.org/2004/08/wsdl/in-out" target=3D"_=
blank">http://www.w3.org/2004/08/wsdl/in-out</a>"<br>
class=3D=
"org.apache.axis2.rpc.receivers.RPCMessageReceiver"/><br> =
; </messageReceivers><br> <schema sc=
hemaNamespace=3D"<a onclick=3D"return top.js.OpenExtLink(window,event,=
this)" href=3D"http://hello/xsd%22/" target=3D"_blank">http://hello/xsd&quo=
t;/</a>><br>
<parameter name=3D"ServiceClass">hello.H=
elloWorld</parameter><br></service></p>
<p><strong>build.xml</strong></p>
<p><project basedir=3D"." default=3D"generate.service&quo=
t;></p>
<p> <property environment=3D"env"/><br>&n=
bsp; <property name=3D"AXIS2_HOME" value=3D"$=
{env.AXIS2_HOME}"/></p>
<p> <property name=3D"build.dir" value=3D&qu=
ot;build"/></p>
<p> <path id=3D"axis2.classpath"><br>&nbs=
p; <fileset dir=3D"${AXIS2_HOME=
}/lib"><br> &n=
bsp; <include name=3D"*.jar"/><br> &=
nbsp; </fileset><br> </path>=
;</p>
<p> <target name=3D"compile.service"><br>=
<mkdir dir=3D"${build.di=
r}"/><br> <mkdir dir=
=3D"${build.dir}/classes"/></p>
<p> <!--First let's compil=
e the classes--><br> <javac=
debug=3D"on" <br>  =
; fork=3D"true"<br> &nbs=
p; =
destdir=3D"${build.dir}/classes" <br> &nbs=
p; srcdir=3D"${b=
asedir}/src"<br>
&nb=
sp; classpathref=3D"axis2.classpath"><br> &nb=
sp; </javac><br> </targe=
t></p>
<p> <target name=3D"generate.wsdl" depends=
=3D"compile.service"><br> &=
nbsp; <taskdef name=3D"java2wsdl"<br> &=
nbsp; cla=
ssname=3D"org.apache.ws.java2wsdl.Java2WSDLTask"<br>
&nb=
sp; classpathref=3D"axis2.classpath"/><br>&n=
bsp; <java2wsdl className=3D"he=
llo.HelloWorld"<br> &nb=
sp; outputLocation=3D=
"${build.dir}"<br>  =
; targetNamespa=
ce=3D"<a onclick=3D"return top.js.OpenExtLink(window,event,this)" href=
=3D"http://hello/" target=3D"_blank">http://hello</a>"<br>
&nb=
sp; schemaTargetNamespace=3D"<a onclick=
=3D"return top.js.OpenExtLink(window,event,this)" href=3D"http://hello/xsd"=
target=3D"_blank">http://hello/xsd</a>"><br> &nbs=
p; <classpath><br> &nb=
sp; =
<pathelement path=3D"${axis2.classpath}"/><br>
&nb=
sp; <pathelement location=3D"${build.dir}/classes"=
/><br> =
</classpath><br> </java=
2wsdl><br> </target></p>
<p> <target name=3D"generate.service" depend=
s=3D"compile.service"><br> =
<!--aar them up --><br> &nb=
sp; <copy toDir=3D"${build.dir}/classes" failonerror=3D"f=
alse"><br>
<file=
set dir=3D"${basedir}/resources"><br> &=
nbsp; <inclu=
de name=3D"**/*.xml"/><br> =
</fileset><br> =
</copy><br> &nb=
sp; <jar destfile=3D"${build.dir}/HelloWorld.aar"><br>
<file=
set excludes=3D"**/Test.class" dir=3D"${build.dir}/classes&q=
uot;/><br> </jar><br>&nb=
sp; </target></p>
<p> <target name=3D"clean"><br> &nbs=
p; <delete dir=3D"${build.dir}"/=
><br> </target><br></project><br></p>
<p><strong>HelloWorld.wsdl</strong></p>
<p><?xml version=3D"1.0" encoding=3D"UTF-8"?><br>=
<wsdl:definitions xmlns:wsdl=3D"<a onclick=3D"return top.js.OpenExt=
Link(window,event,this)" href=3D"http://schemas.xmlsoap.org/wsdl/" target=
=3D"_blank">http://schemas.xmlsoap.org/wsdl/</a>" xmlns:axis2=3D"=
<a onclick=3D"return top.js.OpenExtLink(window,event,this)" href=3D"http://=
hello/" target=3D"_blank">http://hello</a>" xmlns:mime=3D"<a oncl=
ick=3D"return top.js.OpenExtLink(window,event,this)" href=3D"http://schemas=
.xmlsoap.org/wsdl/mime/" target=3D"_blank">http://schemas.xmlsoap.org/wsdl/=
mime/</a>" xmlns:ns0=3D"<a onclick=3D"return top.js.OpenExtLink(w=
indow,event,this)" href=3D"http://hello/xsd" target=3D"_blank">http://hello=
/xsd</a>" xmlns:soap12=3D"<a onclick=3D"return top.js.OpenExtLink=
(window,event,this)" href=3D"http://schemas.xmlsoap.org/wsdl/soap12/" targe=
t=3D"_blank">http://schemas.xmlsoap.org/wsdl/soap12/</a>" xmlns:http=
=3D"<a onclick=3D"return top.js.OpenExtLink(window,event,this)" href=
=3D"http://schemas.xmlsoap.org/wsdl/http/" target=3D"_blank">http://schemas=
.xmlsoap.org/wsdl/http/</a>" xmlns:ns1=3D"<a onclick=3D"return to=
p.js.OpenExtLink(window,event,this)" href=3D"http://org.apache.axis2/xsd" t=
arget=3D"_blank">http://org.apache.axis2/xsd</a>" xmlns:wsaw=3D"<=
a onclick=3D"return top.js.OpenExtLink(window,event,this)" href=3D"http://w=
ww.w3.org/2006/05/addressing/wsdl" target=3D"_blank">http://www.w3.org/2006=
/05/addressing/wsdl</a>" xmlns:xs=3D"<a onclick=3D"return top.js.=
OpenExtLink(window,event,this)" href=3D"http://www.w3.org/2001/XMLSchema" t=
arget=3D"_blank">http://www.w3.org/2001/XMLSchema</a>" xmlns:soap=3D&q=
uot;<a onclick=3D"return top.js.OpenExtLink(window,event,this)" href=3D"htt=
p://schemas.xmlsoap.org/wsdl/soap/" target=3D"_blank">http://schemas.xmlsoa=
p.org/wsdl/soap/</a>" targetNamespace=3D"<a onclick=3D"return top=
.js.OpenExtLink(window,event,this)" href=3D"http://hello/" target=3D"_blank=
">http://hello</a>"><br>
<wsdl:types><br> &nbs=
p; <xs:schema xmlns:xsd=3D"<a onclick=3D"return top.js.OpenEx=
tLink(window,event,this)" href=3D"http://hello/xsd" target=3D"_blank">http:=
//hello/xsd</a>" targetNamespace=3D"<a onclick=3D"return top.js.O=
penExtLink(window,event,this)" href=3D"http://hello/xsd" target=3D"_blank">=
http://hello/xsd</a>" attributeFormDefault=3D"qualified" ele=
mentFormDefault=3D"qualified"><br>
<xs:e=
lement name=3D"sayHello"><br> &nb=
sp; <xs:complexTyp=
e><br> =
<xs:sequence><br>&nb=
sp; =
<xs:element=
name=3D"str_1" minOccurs=3D"0" type=3D"xs:string&=
quot; nillable=3D"true"/><br>
&nb=
sp; </xs:sequence><br>  =
; &n=
bsp; </xs:complexType><br> &=
nbsp; </xs:element><br> &nbs=
p; <xs:element name=3D"sayHello=
Response"><br>  =
; <xs:complexType><br>
&nb=
sp; <xs:sequence><br> =
&nb=
sp; <xs:element name=3D&=
quot;return" minOccurs=3D"0" type=3D"xs:int"/><=
br> =
</xs:sequence><br> &n=
bsp;  =
; </xs:complexType><br>
</xs:=
element><br> </xs:schema>=
;<br> </wsdl:types><br> <wsdl:=
message name=3D"sayHelloRequest"><br> &=
nbsp; <wsdl:part name=3D"parameters" element=3D&qu=
ot;ns0:sayHello"/><br>
</wsdl:message><br> <wsdl:mes=
sage name=3D"sayHelloResponse"><br> &nb=
sp; <wsdl:part name=3D"parameters" element=3D"=
;ns0:sayHelloResponse"/><br> </wsdl:message>=
;<br> <wsdl:portType name=3D"HelloWorldPortType&q=
uot;><br>
<wsdl:operation name=3D"=
sayHello"><br>  =
; <wsdl:input message=3D"axis2:sayHelloRequest" ws=
aw:Action=3D"urn:sayHello"/><br> =
<wsdl:output message=3D"axis2:=
sayHelloResponse" wsaw:Action=3D"urn:sayHelloResponse"/><=
br>
</wsdl:operation><br> =
; </wsdl:portType><br> <wsdl:binding=
name=3D"HelloWorldSOAP11Binding" type=3D"axis2:HelloWorldPo=
rtType"><br> <soap:bin=
ding transport=3D"<a onclick=3D"return top.js.OpenExtLink(window,event=
,this)" href=3D"http://schemas.xmlsoap.org/soap/http" target=3D"_blank">htt=
p://schemas.xmlsoap.org/soap/http</a>" style=3D"document"/&g=
t;<br>
<wsdl:operation name=3D"=
sayHello"><br>  =
; <soap:operation soapAction=3D"urn:sayHello" styl=
e=3D"document"/><br> =
<wsdl:input><br> &nbs=
p; <soap:bod=
y use=3D"literal"/><br>
</wsd=
l:input><br> =
<wsdl:output><br> &nb=
sp; <soap:body use=3D"lit=
eral"/><br> &n=
bsp; </wsdl:output><br> &nbs=
p; </wsdl:operation><br> </wsdl:binding><br>
<wsdl:binding name=3D"HelloWorldSOAP12Binding&qu=
ot; type=3D"axis2:HelloWorldPortType"><br> &n=
bsp; <soap12:binding transport=3D"<a onclick=3D"r=
eturn top.js.OpenExtLink(window,event,this)" href=3D"http://schemas.xmlsoap=
.org/soap/http" target=3D"_blank">http://schemas.xmlsoap.org/soap/http</a>&=
quot; style=3D"document"/><br>
<wsdl:operation name=3D"=
sayHello"><br>  =
; <soap12:operation soapAction=3D"urn:sayHello" st=
yle=3D"document"/><br> &nbs=
p; <wsdl:input><br> &n=
bsp; <soap12=
:body use=3D"literal"/><br>
</wsd=
l:input><br> =
<wsdl:output><br> &nb=
sp; <soap12:body use=3D"l=
iteral"/><br> =
</wsdl:output><br> &n=
bsp; </wsdl:operation><br> </wsdl:binding><br=
>
<wsdl:binding name=3D"HelloWorldHttpBinding"=
; type=3D"axis2:HelloWorldPortType"><br> &nbs=
p; <http:binding verb=3D"POST"/><br> =
; <wsdl:operation name=3D"sayHe=
llo"><br>
<http=
:operation location=3D"HelloWorld/sayHello"/><br> &=
nbsp; <wsdl:input><br=
> &n=
bsp; <mime:content type=3D"text/xml" part=3D"=
sayHello"/><br> &nbs=
p; </wsdl:input><br>
<wsdl=
:output><br> =
<mime:content type=3D"text/xml"=
part=3D"sayHello"/><br> &n=
bsp; </wsdl:output><br> &nbs=
p; </wsdl:operation><br> </wsd=
l:binding><br>
<wsdl:service name=3D"HelloWorld"><br>&n=
bsp; <wsdl:port name=3D"HelloWo=
rldSOAP11port_http" binding=3D"axis2:HelloWorldSOAP11Binding"=
;><br> =
<soap:address location=3D"<a onclick=3D"return top.js.OpenExtLink(=
window,event,this)" href=3D"http://localhost:8080/axis2/services/HelloWorld=
%22/" target=3D"_blank">http://localhost:8080/axis2/services/HelloWorld&quo=
t;/</a>><br>
</wsdl:port><br> &nbs=
p; <wsdl:port name=3D"HelloWorldSOAP1=
2port_http" binding=3D"axis2:HelloWorldSOAP12Binding"><br=
> <soa=
p12:address location=3D"<a onclick=3D"return top.js.OpenExtLink(window=
,event,this)" href=3D"http://localhost:8080/axis2/services/HelloWorld%22/" =
target=3D"_blank">http://localhost:8080/axis2/services/HelloWorld"/</a=
>><br>
</wsdl:port><br> &nbs=
p; <wsdl:port name=3D"HelloWorldHttpp=
ort" binding=3D"axis2:HelloWorldHttpBinding"><br> &n=
bsp; <http:address=
location=3D"<a onclick=3D"return top.js.OpenExtLink(window,event,this=
)" href=3D"http://localhost:8080/axis2/services/HelloWorld%22/" target=3D"_=
blank">http://localhost:8080/axis2/services/HelloWorld"/</a>><br>
</wsdl:port><br> &nbs=
p; </wsdl:service><br></wsdl:definitions><br><br><strong>=
xsd file is</strong> : </p>
<div>
<div style=3D"MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><a onclick=3D"return top=
.js.OpenExtLink(window,event,this)" href=3D"http://localhost:8080/axis2/ser=
vices/HelloWorld?xsd#" target=3D"_blank"><strong><font face=3D"Courier New"=
color=3D"#ff0000">-</font></strong></a> <xs:schema attributeFormDefault=
=3D"qualified" elementFormDefault=3D"qualified" targetN=
amespace=3D"<a onclick=3D"return top.js.OpenExtLink(window,event,this)=
" href=3D"http://hello/xsd" target=3D"_blank">http://hello/xsd</a>" xm=
lns:axis2=3D"<a onclick=3D"return top.js.OpenExtLink(window,event,this=
)" href=3D"http://hello/" target=3D"_blank">http://hello</a>" xmlns:ns=
=3D"<a onclick=3D"return top.js.OpenExtLink(window,event,this)" href=
=3D"http://hello/xsd" target=3D"_blank">http://hello/xsd</a>" xmlns:ns=
0=3D"<a onclick=3D"return top.js.OpenExtLink(window,event,this)" href=
=3D"http://hello/xsd" target=3D"_blank">http://hello/xsd</a>" xmlns:ns=
1=3D"<a onclick=3D"return top.js.OpenExtLink(window,event,this)" href=
=3D"http://org.apache.axis2/xsd" target=3D"_blank">http://org.apache.axis2/=
xsd</a>" xmlns:xs=3D"<a onclick=3D"return top.js.OpenExtLink(wind=
ow,event,this)" href=3D"http://www.w3.org/2001/XMLSchema" target=3D"_blank"=
>http://www.w3.org/2001/XMLSchema</a>"><br>
- <xs:element name=3D"sayHello"><br>- <xs:complexType>=
;<br>- <xs:sequence><br> <xs:element name=3D"str_1"=
; nillable=3D"true" type=3D"xs:string" /> <br> =
</xs:sequence><br>
</xs:complexType><br> </xs:element><br>- <xs:el=
ement name=3D"sayHelloResponse"><br>- <xs:complexType><b=
r>- <xs:sequence><br> <xs:element name=3D"return" =
nillable=3D"true" type=3D"xs:int" /> <br>
</xs:sequence><br> </xs:complexType><br> <=
;/xs:element><br> </xs:schema></div></div></div>
<div> </div>
<div> </div>
<div><strong>And my client side code is : client is developed using eclips =
3.1 </strong></div>
<div><strong></strong> </div>
<div><strong>HelloWorld.java</strong></div>
<div>
<p>import java.util.Iterator;<br>import org.apache.wsif.WSIFMessage;<br>imp=
ort org.apache.wsif.WSIFOperation;<br>import org.apache.wsif.WSIFPort;<br>i=
mport org.apache.wsif.WSIFService;<br>import org.apache.wsif.WSIFServiceFac=
tory;</p>
<p>import javax.xml.namespace.QName;<br>public class HelloWorld {</p>
<p> /**<br> * @param args<br> * <br> */<br> <br=
> public static void main(String[] args) throws Exception {<br> &=
nbsp;System.out.println("Start -- 1");<br> String str1=
=3D"Rizwan";<br> <br> <br> <br> &=
nbsp;WSIFServiceFactory factory =3D WSIFServiceFactory.newInstance();<br>
String wsdlloc=3D"<a onclick=3D"return top.js.OpenExtLink(=
window,event,this)" href=3D"http://localhost:8080/axis2/services/HelloWorld=
?wsdl" target=3D"_blank">http://localhost:8080/axis2/services/HelloWorld?ws=
dl</a>";<br>
System.out.println(" -- 2 --");<br> WSIFSe=
rvice service =3D factory.getService(wsdlloc,null,null ,"<a>http://hel=
lo","HelloWorldPortType</a>");<br> service.mapTyp=
e(new QName("<a onclick=3D"return top.js.OpenExtLink(window,event,this=
)" href=3D"http://hello/xsd%22,%22HelloWorld%22),Class.forName(%22clientsid=
ecode.HelloClient.HelloWorld" target=3D"_blank">http://hello/xsd",&quo=
t;HelloWorld"),Class.forName("clientsidecode.HelloClient.HelloWor=
ld</a>"));<br>
WSIFPort port =3D service.getPort("HelloWorldSOAP11port_ht=
tp");<br> System.out.println("-- 3--");<br> =
WSIFOperation operation=3Dport.createOperation("sayHello");=
<br> WSIFMessage input =3D operation.createInputMessage("st=
r_1");<br>
WSIFMessage output =3Doperation.createOutputMessage();<br> =
; WSIFMessage fault =3D operation.createFaultMessage();<br>  =
;input.setObjectPart("str_1",str1);<br> String str_2=
=3D"Hi";<br> System.out.println("Input Message&qu=
ot;+input);<br>
System.out.println("Input parts : "+input.getObjectPa=
rt("str_1"));<br> //input.setObjectPart("part1&qu=
ot;,str_2);<br> <br> if(operation.executeRequestRespo=
nseOperation(input,output,fault))<br>
{<br> System.out.println("Result : "=
+output.getIntPart("return"));<br> }<br> //=
TODO Auto-generated method stub<br> System.out.println("En=
d");<br> <br> }</p>
<p>}<br></p>
<p>All the pre-required jar of the WSIF are being installed.</p>
<p>When i run the client the following error occured. Please suggest me whe=
re will be the exact problem is.</p>
<p> </p></div>
<div> </div>
<div> </div>
<div><strong>OUTPUT :</strong></div>
<div> </div>
<div>Start -- 1</div></font><font color=3D"#ff0000" size=3D"2">
<p>Exception in thread "main" </p></font><u><font color=3D"#00008=
0" size=3D"2">org.apache.wsif.WSIFException</font></u><font color=3D"#ff000=
0" size=3D"2">: exception on AXIS invoke: Exception occurred while trying t=
o invoke service method sayHello; nested exception is:=20
<p>Exception occurred while trying to invoke service method sayHello</p>
<p>at org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.in=
vokeAXISDocStyle(Unknown Source)</p></font><font size=3D"2">
<p>-- 2 --</p>
<p>- WSIF0006W: Multiple WSIFProvider found supporting the same namespace U=
RI '<a onclick=3D"return top.js.OpenExtLink(window,event,this)" href=3D=
"http://schemas.xmlsoap.org/wsdl/soap/" target=3D"_blank">http://schemas.xm=
lsoap.org/wsdl/soap/</a>'. Found ('org.apache.wsif.providers.soap.a=
pacheaxis.WSIFDynamicProvider_ApacheAxis, org.apache.wsif.providers.soap.ap=
achesoap.WSIFDynamicProvider_ApacheSOAP') </p>
<p>- WSIF0007I: Using WSIFProvider 'org.apache.wsif.providers.soap.apac=
heaxis.WSIFDynamicProvider_ApacheAxis' for namespaceURI '<a onclick=
=3D"return top.js.OpenExtLink(window,event,this)" href=3D"http://schemas.xm=
lsoap.org/wsdl/soap/" target=3D"_blank">http://schemas.xmlsoap.org/wsdl/soa=
p/</a>' </p>
<p>-- 3--</p>
<p>Input Messageorg.apache.wsif.base.WSIFDefaultMessage@c2a132 name:str_1</=
p>
<p>Input parts : Rizwan</p></font><font color=3D"#ff0000" size=3D"2">
<p>at org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.in=
vokeRequestResponseOperation(Unknown Source)</p>
<p>at org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.ex=
ecuteRequestResponseOperation(Unknown Source)</p>
<p>at clientsidecode.HelloClient.HelloWorld.main(</p></font><u><font color=
=3D"#000080" size=3D"2">HelloWorld.java:41</font></u><font color=3D"#ff0000=
" size=3D"2">)=20
<p>Caused by: Exception occurred while trying to invoke service method sayH=
ello</p>
<p>at org.apache.axis.message.SOAPFaultBuilder.endElement(</p></font><u><fo=
nt color=3D"#000080" size=3D"2">SOAPFaultBuilder.java:135</font></u><font c=
olor=3D"#ff0000" size=3D"2">)=20
<p>at org.apache.axis.encoding.DeserializationContextImpl.endElement(</p></=
font><u><font color=3D"#000080" size=3D"2">DeserializationContextImpl.java:=
942</font></u><font color=3D"#ff0000" size=3D"2">)=20
<p>at org.apache.crimson.parser.Parser2.maybeElement(</p></font><u><font co=
lor=3D"#000080" size=3D"2">Parser2.java:1528</font></u><font color=3D"#ff00=
00" size=3D"2">)=20
<p>at org.apache.crimson.parser.Parser2.content(</p></font><u><font color=
=3D"#000080" size=3D"2">Parser2.java:1779</font></u><font color=3D"#ff0000"=
size=3D"2">)=20
<p>at org.apache.crimson.parser.Parser2.maybeElement(</p></font><u><font co=
lor=3D"#000080" size=3D"2">Parser2.java:1507</font></u><font color=3D"#ff00=
00" size=3D"2">)=20
<p>at org.apache.crimson.parser.Parser2.content(</p></font><u><font color=
=3D"#000080" size=3D"2">Parser2.java:1779</font></u><font color=3D"#ff0000"=
size=3D"2">)=20
<p>at org.apache.crimson.parser.Parser2.maybeElement(</p></font><u><font co=
lor=3D"#000080" size=3D"2">Parser2.java:1507</font></u><font color=3D"#ff00=
00" size=3D"2">)=20
<p>at org.apache.crimson.parser.Parser2.parseInternal(</p></font><u><font c=
olor=3D"#000080" size=3D"2">Parser2.java:500</font></u><font color=3D"#ff00=
00" size=3D"2">)=20
<p>at org.apache.crimson.parser.Parser2.parse(</p></font><u><font color=3D"=
#000080" size=3D"2">Parser2.java:305</font></u><font color=3D"#ff0000" size=
=3D"2">)=20
<p>at org.apache.crimson.parser.XMLReaderImpl.parse(</p></font><u><font col=
or=3D"#000080" size=3D"2">XMLReaderImpl.java:442</font></u><font color=3D"#=
ff0000" size=3D"2">)=20
<p>at javax.xml.parsers.SAXParser.parse(</p></font><u><font color=3D"#00008=
0" size=3D"2">SAXParser.java:375</font></u><font color=3D"#ff0000" size=3D"=
2">)=20
<p>at org.apache.axis.encoding.DeserializationContextImpl.parse(</p></font>=
<u><font color=3D"#000080" size=3D"2">DeserializationContextImpl.java:232</=
font></u><font color=3D"#ff0000" size=3D"2">)=20
<p>at org.apache.axis.SOAPPart.getAsSOAPEnvelope(</p></font><u><font color=
=3D"#000080" size=3D"2">SOAPPart.java:546</font></u><font color=3D"#ff0000"=
size=3D"2">)=20
<p>at org.apache.axis.Message.getSOAPEnvelope(</p></font><u><font color=3D"=
#000080" size=3D"2">Message.java:377</font></u><font color=3D"#ff0000" size=
=3D"2">)=20
<p>at org.apache.axis.client.Call.invokeEngine(</p></font><u><font color=3D=
"#000080" size=3D"2">Call.java:2132</font></u><font color=3D"#ff0000" size=
=3D"2">)=20
<p>at org.apache.axis.client.Call.invoke(</p></font><u><font color=3D"#0000=
80" size=3D"2">Call.java:2102</font></u><font color=3D"#ff0000" size=3D"2">=
)=20
<p>at org.apache.axis.client.Call.invoke(</p></font><u><font color=3D"#0000=
80" size=3D"2">Call.java:1851</font></u><font color=3D"#ff0000" size=3D"2">=
)=20
<p>at org.apache.axis.client.Call.invoke(</p></font><u><font color=3D"#0000=
80" size=3D"2">Call.java:1777</font></u><font color=3D"#ff0000" size=3D"2">=
)=20
<p>at org.apache.axis.client.Call.invoke(</p></font><u><font color=3D"#0000=
80" size=3D"2">Call.java:1315</font></u><font color=3D"#ff0000" size=3D"2">=
)=20
<p>... 4 more</p></font>
------=_Part_6286_3027566.1201368257928--