You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-user@ws.apache.org by Philipp Leitner <ph...@gmx.at> on 2007/07/06 15:21:03 UTC

WSIF Invocation of document/literal Web Service

Hi all,

I have deployed a Web Service using Apache Axis2. The service uses 
document/literal with "wrapped" parameter style and provides a few 
simple test methods. You can find the WSDL definitions at 
http://www.mines-of-moria.de/OrderService.wsdl .

I used the Apache Axis (v1) WSDl2Java tool to generate an "interface" 
for the Web Service and tried to invoke this interface using WSIF. 
Unfortunately the following exception is thrown:

Exception in thread "main" org.apache.wsif.WSIFException: Method 
getString(class java.lang.String) was not found in portType 
{http://service.pojo.sample}DADocTestServicePortType
         at 
org.apache.wsif.base.WSIFClientProxy.findMatchingOperation(Unknown Source)
         at org.apache.wsif.base.WSIFClientProxy.invoke(Unknown Source)
         at $Proxy1.getString(Unknown Source)
         at 
at.ac.tuwien.infosys.dsg.dacoss.eval.v2.WSIFRunner.doStringInvocation(WSIFRunner.java:96)
         at 
at.ac.tuwien.infosys.dsg.dacoss.eval.v2.WSIFRunner.main(WSIFRunner.java:56)


Analogous exceptions are thrown if I try to invoke any other operation 
in this service using WSIF... as you can see in the WSDL as posted above 
the method that WSIF seems not to be finding is available just fine in 
the service ...

I tried to redeploy the same service using rpc/encoded, and with this 
encoding style the WSIF invocation worked smoothly ...

Is there any known limitation with WSIF and document/wrapped ?

thanks,
philipp

---------------------------------------------------------------------
To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
For additional commands, e-mail: wsif-user-help@ws.apache.org


Re: WSIF Invocation of document/literal Web Service

Posted by Philipp Leitner <ph...@gmx.at>.
OK, I now managed to solve at least the problems in RPC style - I just 
forgot that arrays are handled as complex XSD types and have to be mapped

(i.e. something like

service.mapType(new
   QName("http://localhost:8080/axis/services/OrderService",
   "ArrayOf_xsd_string"),
   String[].class);

was missing)

Now I wonder if a similar issue is causing my problems with doc/lit 
style. How would I map a doc/lit structure like

<xs:element name="getString">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="param0" nillable="true" type="xs:string"/>
     </xs:sequence>
   </xs:complexType>
</xs:element>

? Should such a doc/lit structure representing a simple String not be 
mapped automatically?

/philipp

Philipp Leitner wrote:
> I just tried the ZIP code example that comes with WSIF which seems to 
> follow document/literal style, and it worked smoothly.
> 
> Thinking about it: do you think that the exception that I posted earlier
> 
> (Exception in thread "main" org.apache.wsif.WSIFException: Method
>   getString(class java.lang.String) was not found in portType
>   {http://service.pojo.sample}DADocTestServicePortType)
> 
> might be a namespace issue? If this is the case: do you have any 
> suggestions of what I can do about it?
> 
> /philipp
> 
> Aleksander Slominski wrote:
>> hi philipp,
>>
>> debugging XML is never easy ;) did you try other WSDL files, preferably
>> one of these included in the latest WSIF distribution (like RC2 -
>> http://people.apache.org/dist/ws/wsif/ )? did they work for you?
>>
>> best,
>>
>> Alek
>>
>> Philipp Leitner wrote:
>>> Sidenote: I just recognized that I am having the same problems with
>>> RPC and services that take an array of Strings as argument. Is anybody
>>> aware of this problems? Am I doing something wrong here?
>>>
>>> /philipp
>>>
>>> Philipp Leitner wrote:
>>>> Hi all,
>>>>
>>>> I have deployed a Web Service using Apache Axis2. The service uses
>>>> document/literal with "wrapped" parameter style and provides a few
>>>> simple test methods. You can find the WSDL definitions at
>>>> http://www.mines-of-moria.de/OrderService.wsdl .
>>>>
>>>> I used the Apache Axis (v1) WSDl2Java tool to generate an "interface"
>>>> for the Web Service and tried to invoke this interface using WSIF.
>>>> Unfortunately the following exception is thrown:
>>>>
>>>> Exception in thread "main" org.apache.wsif.WSIFException: Method
>>>> getString(class java.lang.String) was not found in portType
>>>> {http://service.pojo.sample}DADocTestServicePortType
>>>>         at
>>>> org.apache.wsif.base.WSIFClientProxy.findMatchingOperation(Unknown
>>>> Source)
>>>>         at org.apache.wsif.base.WSIFClientProxy.invoke(Unknown Source)
>>>>         at $Proxy1.getString(Unknown Source)
>>>>         at
>>>> at.ac.tuwien.infosys.dsg.dacoss.eval.v2.WSIFRunner.doStringInvocation(WSIFRunner.java:96) 
>>>>
>>>>
>>>>         at
>>>> at.ac.tuwien.infosys.dsg.dacoss.eval.v2.WSIFRunner.main(WSIFRunner.java:56) 
>>>>
>>>>
>>>>
>>>>
>>>> Analogous exceptions are thrown if I try to invoke any other
>>>> operation in this service using WSIF... as you can see in the WSDL as
>>>> posted above the method that WSIF seems not to be finding is
>>>> available just fine in the service ...
>>>>
>>>> I tried to redeploy the same service using rpc/encoded, and with this
>>>> encoding style the WSIF invocation worked smoothly ...
>>>>
>>>> Is there any known limitation with WSIF and document/wrapped ?
>>>>
>>>> thanks,
>>>> philipp
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
>>>> For additional commands, e-mail: wsif-user-help@ws.apache.org
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: wsif-user-help@ws.apache.org
>>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: wsif-user-help@ws.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
For additional commands, e-mail: wsif-user-help@ws.apache.org


Re: WSIF Invocation of document/literal Web Service

Posted by Philipp Leitner <ph...@gmx.at>.
I just tried the ZIP code example that comes with WSIF which seems to 
follow document/literal style, and it worked smoothly.

Thinking about it: do you think that the exception that I posted earlier

(Exception in thread "main" org.apache.wsif.WSIFException: Method
   getString(class java.lang.String) was not found in portType
   {http://service.pojo.sample}DADocTestServicePortType)

might be a namespace issue? If this is the case: do you have any 
suggestions of what I can do about it?

/philipp

Aleksander Slominski wrote:
> hi philipp,
> 
> debugging XML is never easy ;) did you try other WSDL files, preferably
> one of these included in the latest WSIF distribution (like RC2 -
> http://people.apache.org/dist/ws/wsif/ )? did they work for you?
> 
> best,
> 
> Alek
> 
> Philipp Leitner wrote:
>> Sidenote: I just recognized that I am having the same problems with
>> RPC and services that take an array of Strings as argument. Is anybody
>> aware of this problems? Am I doing something wrong here?
>>
>> /philipp
>>
>> Philipp Leitner wrote:
>>> Hi all,
>>>
>>> I have deployed a Web Service using Apache Axis2. The service uses
>>> document/literal with "wrapped" parameter style and provides a few
>>> simple test methods. You can find the WSDL definitions at
>>> http://www.mines-of-moria.de/OrderService.wsdl .
>>>
>>> I used the Apache Axis (v1) WSDl2Java tool to generate an "interface"
>>> for the Web Service and tried to invoke this interface using WSIF.
>>> Unfortunately the following exception is thrown:
>>>
>>> Exception in thread "main" org.apache.wsif.WSIFException: Method
>>> getString(class java.lang.String) was not found in portType
>>> {http://service.pojo.sample}DADocTestServicePortType
>>>         at
>>> org.apache.wsif.base.WSIFClientProxy.findMatchingOperation(Unknown
>>> Source)
>>>         at org.apache.wsif.base.WSIFClientProxy.invoke(Unknown Source)
>>>         at $Proxy1.getString(Unknown Source)
>>>         at
>>> at.ac.tuwien.infosys.dsg.dacoss.eval.v2.WSIFRunner.doStringInvocation(WSIFRunner.java:96)
>>>
>>>         at
>>> at.ac.tuwien.infosys.dsg.dacoss.eval.v2.WSIFRunner.main(WSIFRunner.java:56)
>>>
>>>
>>>
>>> Analogous exceptions are thrown if I try to invoke any other
>>> operation in this service using WSIF... as you can see in the WSDL as
>>> posted above the method that WSIF seems not to be finding is
>>> available just fine in the service ...
>>>
>>> I tried to redeploy the same service using rpc/encoded, and with this
>>> encoding style the WSIF invocation worked smoothly ...
>>>
>>> Is there any known limitation with WSIF and document/wrapped ?
>>>
>>> thanks,
>>> philipp
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: wsif-user-help@ws.apache.org
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: wsif-user-help@ws.apache.org
>>
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
For additional commands, e-mail: wsif-user-help@ws.apache.org


Re: WSIF Invocation of document/literal Web Service

Posted by Aleksander Slominski <as...@cs.indiana.edu>.
hi philipp,

debugging XML is never easy ;) did you try other WSDL files, preferably
one of these included in the latest WSIF distribution (like RC2 -
http://people.apache.org/dist/ws/wsif/ )? did they work for you?

best,

Alek

Philipp Leitner wrote:
> Sidenote: I just recognized that I am having the same problems with
> RPC and services that take an array of Strings as argument. Is anybody
> aware of this problems? Am I doing something wrong here?
>
> /philipp
>
> Philipp Leitner wrote:
>> Hi all,
>>
>> I have deployed a Web Service using Apache Axis2. The service uses
>> document/literal with "wrapped" parameter style and provides a few
>> simple test methods. You can find the WSDL definitions at
>> http://www.mines-of-moria.de/OrderService.wsdl .
>>
>> I used the Apache Axis (v1) WSDl2Java tool to generate an "interface"
>> for the Web Service and tried to invoke this interface using WSIF.
>> Unfortunately the following exception is thrown:
>>
>> Exception in thread "main" org.apache.wsif.WSIFException: Method
>> getString(class java.lang.String) was not found in portType
>> {http://service.pojo.sample}DADocTestServicePortType
>>         at
>> org.apache.wsif.base.WSIFClientProxy.findMatchingOperation(Unknown
>> Source)
>>         at org.apache.wsif.base.WSIFClientProxy.invoke(Unknown Source)
>>         at $Proxy1.getString(Unknown Source)
>>         at
>> at.ac.tuwien.infosys.dsg.dacoss.eval.v2.WSIFRunner.doStringInvocation(WSIFRunner.java:96)
>>
>>         at
>> at.ac.tuwien.infosys.dsg.dacoss.eval.v2.WSIFRunner.main(WSIFRunner.java:56)
>>
>>
>>
>> Analogous exceptions are thrown if I try to invoke any other
>> operation in this service using WSIF... as you can see in the WSDL as
>> posted above the method that WSIF seems not to be finding is
>> available just fine in the service ...
>>
>> I tried to redeploy the same service using rpc/encoded, and with this
>> encoding style the WSIF invocation worked smoothly ...
>>
>> Is there any known limitation with WSIF and document/wrapped ?
>>
>> thanks,
>> philipp
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: wsif-user-help@ws.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: wsif-user-help@ws.apache.org
>


-- 
The best way to predict the future is to invent it - Alan Kay


---------------------------------------------------------------------
To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
For additional commands, e-mail: wsif-user-help@ws.apache.org


Re: WSIF Invocation of document/literal Web Service

Posted by Philipp Leitner <ph...@gmx.at>.
Sidenote: I just recognized that I am having the same problems with RPC 
and services that take an array of Strings as argument. Is anybody aware 
of this problems? Am I doing something wrong here?

/philipp

Philipp Leitner wrote:
> Hi all,
> 
> I have deployed a Web Service using Apache Axis2. The service uses 
> document/literal with "wrapped" parameter style and provides a few 
> simple test methods. You can find the WSDL definitions at 
> http://www.mines-of-moria.de/OrderService.wsdl .
> 
> I used the Apache Axis (v1) WSDl2Java tool to generate an "interface" 
> for the Web Service and tried to invoke this interface using WSIF. 
> Unfortunately the following exception is thrown:
> 
> Exception in thread "main" org.apache.wsif.WSIFException: Method 
> getString(class java.lang.String) was not found in portType 
> {http://service.pojo.sample}DADocTestServicePortType
>         at 
> org.apache.wsif.base.WSIFClientProxy.findMatchingOperation(Unknown Source)
>         at org.apache.wsif.base.WSIFClientProxy.invoke(Unknown Source)
>         at $Proxy1.getString(Unknown Source)
>         at 
> at.ac.tuwien.infosys.dsg.dacoss.eval.v2.WSIFRunner.doStringInvocation(WSIFRunner.java:96) 
> 
>         at 
> at.ac.tuwien.infosys.dsg.dacoss.eval.v2.WSIFRunner.main(WSIFRunner.java:56)
> 
> 
> Analogous exceptions are thrown if I try to invoke any other operation 
> in this service using WSIF... as you can see in the WSDL as posted above 
> the method that WSIF seems not to be finding is available just fine in 
> the service ...
> 
> I tried to redeploy the same service using rpc/encoded, and with this 
> encoding style the WSIF invocation worked smoothly ...
> 
> Is there any known limitation with WSIF and document/wrapped ?
> 
> thanks,
> philipp
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: wsif-user-help@ws.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wsif-user-unsubscribe@ws.apache.org
For additional commands, e-mail: wsif-user-help@ws.apache.org