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 "Peter G. Lane" <la...@mcs.anl.gov> on 2003/03/04 19:46:21 UTC

DII code not working anymore/dynamic stub failing

I'm having trouble with one of the latest nightly build jars.  I had DII 
working last month, but recent changes seemed to have prevented further 
success.  One thing I noticed is that unWrapPart() is deprecated.  I'm a 
little nervous now about what I should be doing in lieu of that since I 
use getWrappedDocLiteralPart() which is not deprecated and implies I'd 
have to then unwrap it.  It looks like this is causing problems with the 
DII method:

      [java] Exception in thread "main" java.lang.ClassCastException: 
org.apache.wsif.schema.ElementType
      [java]     at 
org.apache.wsif.providers.ProviderUtils.getComplexType(ProviderUtils.java:389)
      [java]     at 
org.apache.wsif.providers.ProviderUtils.unWrapPart(ProviderUtils.java:343)
      [java]     at 
org.apache.wsif.util.WSIFUtils.unWrapPart(WSIFUtils.java:1355)


I'm also having trouble using getStub().  I get a proxy object which I 
verify is of the correct interface and has the correct methods using 
java.lang.reflect stuff, but I get an error saying that the method I'm 
trying to call from the stub was not found in the port type:

...
      [java] 3185 [main] DEBUG 
org.globus.ogsa.client.wsif.samples.BasicCounterAdder  - Method: public 
final int $Proxy0.add(int) throws java.rmi.RemoteException
...
      [java] org.apache.wsif.WSIFException: Method add(int) was not 
found in portType {http://ogsa.globus.org/samples/counter}CounterPortType
      [java]     at 
org.apache.wsif.base.WSIFClientProxy.findMatchingOperation(WSIFClientProxy.java:595)
      [java]     at 
org.apache.wsif.base.WSIFClientProxy.invoke(WSIFClientProxy.java:244)
      [java]     at $Proxy0.add(Unknown Source)
      [java]     at 
org.globus.ogsa.client.wsif.samples.BasicCounterAdder.<init>(BasicCounterAdder.java:83)
      [java]     at 
org.globus.ogsa.client.wsif.samples.BasicCounterAdder.main(BasicCounterAdder.java:101)


Thanks!
Peter


Re: DII code not working anymore/dynamic stub failing

Posted by "Peter G. Lane" <la...@mcs.anl.gov>.
I went ahead and dove into the WSIF source and seemed to at least solve my first problem.  Here's a 
diff for ProvderUtils.getComplexType() that works with my WSDLs:

392,394c392,399
<                           if (name.equals(  ((ComplexType)o).getTypeName().getLocalPart() )){
<                                   ct = (ComplexType)o;
<                           }
---
 >                 if (o instanceof ComplexType) {
 >                     ComplexType complexType = (ComplexType) o;
 >                     if (name.equals(complexType.getTypeName().getLocalPart())){
 >                         ct = complexType;
 >                     }
 >                 } else if (o instanceof ElementType) {
 >                     return getComplexType(l, ((ElementType)o).getElementType());
 >                 }

Peter



Peter G. Lane wrote:
> I'm having trouble with one of the latest nightly build jars.  I had DII 
> working last month, but recent changes seemed to have prevented further 
> success.  One thing I noticed is that unWrapPart() is deprecated.  I'm a 
> little nervous now about what I should be doing in lieu of that since I 
> use getWrappedDocLiteralPart() which is not deprecated and implies I'd 
> have to then unwrap it.  It looks like this is causing problems with the 
> DII method:
> 
>      [java] Exception in thread "main" java.lang.ClassCastException: 
> org.apache.wsif.schema.ElementType
>      [java]     at 
> org.apache.wsif.providers.ProviderUtils.getComplexType(ProviderUtils.java:389) 
> 
>      [java]     at 
> org.apache.wsif.providers.ProviderUtils.unWrapPart(ProviderUtils.java:343)
>      [java]     at 
> org.apache.wsif.util.WSIFUtils.unWrapPart(WSIFUtils.java:1355)
> 
> 
> I'm also having trouble using getStub().  I get a proxy object which I 
> verify is of the correct interface and has the correct methods using 
> java.lang.reflect stuff, but I get an error saying that the method I'm 
> trying to call from the stub was not found in the port type:
> 
> ...
>      [java] 3185 [main] DEBUG 
> org.globus.ogsa.client.wsif.samples.BasicCounterAdder  - Method: public 
> final int $Proxy0.add(int) throws java.rmi.RemoteException
> ...
>      [java] org.apache.wsif.WSIFException: Method add(int) was not found 
> in portType {http://ogsa.globus.org/samples/counter}CounterPortType
>      [java]     at 
> org.apache.wsif.base.WSIFClientProxy.findMatchingOperation(WSIFClientProxy.java:595) 
> 
>      [java]     at 
> org.apache.wsif.base.WSIFClientProxy.invoke(WSIFClientProxy.java:244)
>      [java]     at $Proxy0.add(Unknown Source)
>      [java]     at 
> org.globus.ogsa.client.wsif.samples.BasicCounterAdder.<init>(BasicCounterAdder.java:83) 
> 
>      [java]     at 
> org.globus.ogsa.client.wsif.samples.BasicCounterAdder.main(BasicCounterAdder.java:101) 
> 
> 
> 
> Thanks!
> Peter
>