Re:How to dynamicly invoke a web service?
lorkyo <lorkyo-9Onoh4P/[email protected]> Sun, 10 Aug 2008 14:09:22 +0800 (CST)
| Newsgroups | gmane.comp.apache.webservices.wsif.user |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_103631_29088454.1218348562394
Content-Type: text/plain; charset=gbk
Content-Transfer-Encoding: quoted-printable
the "No such operation 'request' '' occured when I used the axis provider W=
SIFDynamicProvider_ApacheAxis(), When I use the soap provider, WSIFDynamicP=
rovider_ApacheSOAP, it would give a error: No Serializer found to serialize=
a 'java.lang.String' using encoding style 'literal'.
The whole WSDL is listed as below:
file 1
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<wsdl:definitions name=3D"WebFeatureService" targetNamespace=3D"http://www.=
globus.org/namespaces/wfs/core/wfs_instance/service" xmlns:wsdl=3D"http://s=
chemas.xmlsoap.org/wsdl/" xmlns:binding=3D"http://www.globus.org/namespaces=
/wfs/core/wfs_instance/bindings" xmlns:soap=3D"http://schemas.xmlsoap.org/w=
sdl/soap/">
<wsdl:import namespace=3D"http://www.globus.org/namespaces/wfs/core/wfs_i=
nstance/bindings" location=3D"WFS_bindings.wsdl"/>
<wsdl:service name=3D"WebFeatureService">
<wsdl:port name=3D"WFSPortTypePort" binding=3D"binding:WFSPortTypeSOAPB=
inding">
<soap:address location=3D"http://localhost:8080/wsrf/services/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
=20
file 2:
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<wsdl:definitions name=3D"WebFeatureService" targetNamespace=3D"http://www.=
globus.org/namespaces/wfs/core/wfs_instance/bindings" xmlns:wsdl=3D"http://=
schemas.xmlsoap.org/wsdl/" xmlns:porttype=3D"http://www.globus.org/namespac=
es/wfs/core/wfs_instance" xmlns:soap=3D"http://schemas.xmlsoap.org/wsdl/soa=
p/">
<wsdl:import namespace=3D"http://www.globus.org/namespaces/wfs/core/wfs_i=
nstance" location=3D"WFS_flattened.wsdl"/>
<wsdl:binding name=3D"WFSPortTypeSOAPBinding" type=3D"porttype:WFSPortTyp=
e">
<soap:binding style=3D"document" transport=3D"http://schemas.xmlsoap.or=
g/soap/http"/>
<wsdl:operation name=3D"doservice">
<soap:operation soapAction=3D"http://www.globus.org/namespaces/wfs/co=
re/wfs_instance/WFSPortType/doserviceRequest"/>
<wsdl:input>
<soap:body use=3D"literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use=3D"literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
file 3 :
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<definitions name=3D"WebFeatureService" targetNamespace=3D"http://www.globu=
s.org/namespaces/wfs/core/wfs_instance" xmlns=3D"http://schemas.xmlsoap.org=
/wsdl/" xmlns:wsrpw=3D"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-Reso=
urceProperties-1.2-draft-01.wsdl" xmlns:wsdlpp=3D"http://www.globus.org/nam=
espaces/2004/10/WSDLPreprocessor" xmlns:wsdl=3D"http://schemas.xmlsoap.org/=
wsdl/" xmlns:tns=3D"http://www.globus.org/namespaces/wfs/core/wfs_instance"=
xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" xmlns:wsrp=3D"http://docs.o=
asis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd">
<types>
<xsd:schema targetNamespace=3D"http://www.globus.org/namespaces/wfs/cor=
e/wfs_instance" xmlns:tns=3D"http://www.globus.org/namespaces/wfs/core/wfs_=
instance" xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema">
=20
<!-- REQUESTS AND RESPONSES -->
=20
<xsd:element name=3D"request" type=3D"xsd:string"/>
<xsd:element name=3D"response" type=3D"xsd:string"/>
</xsd:schema>
</types>
<message name=3D"RequestMessage">
<part name=3D"parameters" element=3D"tns:request"/>
</message>
<message name=3D"ResponseMessage">
<part name=3D"parameters" element=3D"tns:response"/>
</message>
<portType name=3D"WFSPortType">
<operation name=3D"doservice">
<input message=3D"tns:RequestMessage"/>
<output message=3D"tns:ResponseMessage"/>
</operation>
</portType>
</definitions>.
If I change the parts of third file to be :
<message name=3D"RequestMessage">
<part name=3D"parameters" type=3D"txsd:string"/>
</message>
<message name=3D"ResponseMessage">
<part name=3D"parameters" type=3D"txsd:string"/>
</message>
I got a erro: No such operation 'parameters'
=D4=DA2008-08-10=A3=AClorkyo <lorkyo-9Onoh4P/[email protected]> =D0=B4=B5=C0=A3=BA
Hello, I'm new in using wsif, can anyone give me a example on how to invok=
e a webservice? the sample "DynamicInvoker" only support parts as a to be b=
asic type, such as integer, String ansd so on. But if a part refers to a XM=
L element listed below, How should I do?=20
<xsd:element name=3D"request" type=3D"xsd:string"/>
<xsd:element name=3D"response" type=3D"xsd:string"/>
</xsd:schema>
</types>
<message name=3D"RequestMessage">
<part name=3D"parameters" element=3D"tns:request"/>
</message>
<message name=3D"ResponseMessage">
<part name=3D"parameters" element=3D"tns:response"/>
</message>
<portType name=3D"WFSPortType">
<operation name=3D"doservice">
<input message=3D"tns:RequestMessage"/>
<output message=3D"tns:ResponseMessage"/>
</operation>
</portType>
</definitions>
=20
I have tried to pass String object as in put,but get a error :No such opera=
tion 'request' . Do I need to pass Elements as input parameters? How to g=
enerate such Elements and How to set their values?
=20
------=_Part_103631_29088454.1218348562394
Content-Type: text/html; charset=gbk
Content-Transfer-Encoding: quoted-printable
<div>the "No such operation 'request' '' occured when I used the axis provi=
der WSIFDynamicProvider_ApacheAxis(), When I use the soap provider, WSIFDyn=
amicProvider_ApacheSOAP, it would give a error: No Serializer found to seri=
alize a 'java.lang.String' using encoding style 'literal'.<br><br>The whole=
WSDL is listed as below:<br>file 1<br><?xml version=3D"1.0" encoding=3D=
"UTF-8"?><br><wsdl:definitions name=3D"WebFeatureService" targetNames=
pace=3D"http://www.globus.org/namespaces/wfs/core/wfs_instance/service" xml=
ns:wsdl=3D"http://schemas.xmlsoap.org/wsdl/" xmlns:binding=3D"http://www.gl=
obus.org/namespaces/wfs/core/wfs_instance/bindings" xmlns:soap=3D"http://sc=
hemas.xmlsoap.org/wsdl/soap/"><br> <wsdl:import namespace=3D"ht=
tp://www.globus.org/namespaces/wfs/core/wfs_instance/bindings" location=3D"=
WFS_bindings.wsdl"/><br> <wsdl:service name=3D"WebFeatureServic=
e"><br> <wsdl:port name=3D"WFSPortTypePort" binding=
=3D"binding:WFSPortTypeSOAPBinding"><br> &=
lt;soap:address location=3D"http://localhost:8080/wsrf/services/"/><br>&=
nbsp; </wsdl:port><br> </wsdl:service><br><=
;/wsdl:definitions><br></div><div> </div><div></div>file 2:<br><=
?xml version=3D"1.0" encoding=3D"UTF-8"?><br><wsdl:definitions name=
=3D"WebFeatureService" targetNamespace=3D"http://www.globus.org/namespaces/=
wfs/core/wfs_instance/bindings" xmlns:wsdl=3D"http://schemas.xmlsoap.org/ws=
dl/" xmlns:porttype=3D"http://www.globus.org/namespaces/wfs/core/wfs_instan=
ce" xmlns:soap=3D"http://schemas.xmlsoap.org/wsdl/soap/"><br> <=
wsdl:import namespace=3D"http://www.globus.org/namespaces/wfs/core/wfs_inst=
ance" location=3D"WFS_flattened.wsdl"/><br> <wsdl:binding name=
=3D"WFSPortTypeSOAPBinding" type=3D"porttype:WFSPortType"><br> &nbs=
p; <soap:binding style=3D"document" transport=3D"http://schemas.xm=
lsoap.org/soap/http"/><br> <wsdl:operation name=3D"=
doservice"><br> <soap:operation soapAct=
ion=3D"http://www.globus.org/namespaces/wfs/core/wfs_instance/WFSPortType/d=
oserviceRequest"/><br> <wsdl:input><=
br> <soap:body use=3D"literal"=
/><br> </wsdl:input><br> =
<wsdl:output><br> &nb=
sp; <soap:body use=3D"literal"/><br> &nb=
sp; </wsdl:output><br> </wsdl:operation><br>&=
nbsp; </wsdl:binding><br></wsdl:definitions><br><br>file 3 :<br=
><?xml version=3D"1.0" encoding=3D"UTF-8"?><br><definitions name=
=3D"WebFeatureService" targetNamespace=3D"http://www.globus.org/namespaces/=
wfs/core/wfs_instance" xmlns=3D"http://schemas.xmlsoap.org/wsdl/" xmlns:wsr=
pw=3D"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.=
2-draft-01.wsdl" xmlns:wsdlpp=3D"http://www.globus.org/namespaces/2004/10/W=
SDLPreprocessor" xmlns:wsdl=3D"http://schemas.xmlsoap.org/wsdl/" xmlns:tns=
=3D"http://www.globus.org/namespaces/wfs/core/wfs_instance" xmlns:xsd=3D"ht=
tp://www.w3.org/2001/XMLSchema" xmlns:wsrp=3D"http://docs.oasis-open.org/ws=
rf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"><br> <t=
ypes><br> <xsd:schema targetNamespace=3D"http://www=
.globus.org/namespaces/wfs/core/wfs_instance" xmlns:tns=3D"http://www.globu=
s.org/namespaces/wfs/core/wfs_instance" xmlns:xsd=3D"http://www.w3.org/2001=
/XMLSchema"><br> <br><br> <!-- RE=
QUESTS AND RESPONSES --><br> <br> &l=
t;xsd:element name=3D"request" type=3D"xsd:string"/><br> &nbs=
p; <xsd:element name=3D"response" type=3D"xsd:string"/><br></xsd:s=
chema><br> </types><br> <message name=3D"RequestMes=
sage"><br> <part name=3D"parameters" element=3D"tns=
:request"/><br> </message><br> <message name=3D"Res=
ponseMessage"><br> <part name=3D"parameters" elemen=
t=3D"tns:response"/><br> </message><br> <portType n=
ame=3D"WFSPortType"><br> <operation name=3D"doservi=
ce"><br> <input message=3D"tns:RequestM=
essage"/><br> <output message=3D"tns:Re=
sponseMessage"/><br> </operation><br> <=
/portType><br></definitions>.<br><br>If I change the parts of thir=
d file to be :<br><message name=3D"RequestMessage"><br>
<part name=3D"parameters" type=3D"txsd:string"/><b=
r>
</message><br>
<message name=3D"ResponseMessage"><br>
<part name=3D"parameters" type=3D"txsd:string"/><b=
r>
</message><br>I got a erro: No such operation 'parameters'<br>=
<br>=D4=DA2008-08-10=A3=AClorkyo <lorkyo-9Onoh4P/[email protected]> =D0=B4=B5=C0=A3=BA<=
br> <blockquote id=3D"isReplyContent" style=3D"border-left: 1px solid rgb(2=
04, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"><div>Hello, I=
'm new in using wsif, can anyone give me a example on how to invoke a=
webservice? the sample "DynamicInvoker" only support parts as a to be basi=
c type, such as integer, String ansd so on. But if a part refers to a XML e=
lement listed below, How should I do? <br><xsd:element name=3D"request"=
type=3D"xsd:string"/><br> <xsd:element name=3D"res=
ponse" type=3D"xsd:string"/><br></xsd:schema><br> </types=
><br> <message name=3D"RequestMessage"><br>  =
; <part name=3D"parameters" element=3D"tns:request"/><br> </=
message><br> <message name=3D"ResponseMessage"><br> &nb=
sp; <part name=3D"parameters" element=3D"tns:response"/><br>&nb=
sp; </message><br> <portType name=3D"WFSPortType"><br>&nb=
sp; <operation name=3D"doservice"><br> &=
nbsp; <input message=3D"tns:RequestMessage"/><br> &n=
bsp; <output message=3D"tns:ResponseMessage"/><br> &=
nbsp; </operation><br> </portType><br></definiti=
ons></div><div> <br>I have tried to pass String object as in put,bu=
t get a error :No such operation 'request' . Do I need to pass =
Elements as input parameters? How to generate such Elements and How to set&=
nbsp; their values?<br></div><div> </div><div> </div></blockquote=
>
------=_Part_103631_29088454.1218348562394--