I still can't get the stub stuff to work, though. Both my input and output parameters are of type int, so doing a mapTypes on these makes no difference (i.e. I'm still getting the "was not found" error).
Regardless, I do think the following diff on WSIFUtils might have merrit:
1332c1332,1333
< if (!operationName.equals(pName)) {
---
> if ( !pName.equals(operationName)
> && !pName.equals(operationName + "Response")) {If I don't check for this when I try to unwrap the output part, it doesn't work.
Peter
ALI,HANEEF (HP-Cupertino,ex1) wrote:
Hi,
For your second problem , just check whether you have added the mapTypes if it is wrapped operation.
Eg:
If the stub is like
void getName( GetNameRequest document), you have to add the TypeMapping for GetNameRequest
m_Service.mapType( new javax.xml.namespace.QName( 'Namespaceuri", "GetNameRequest"), GetNameRequest.class);
Haneef
-----Original Message-----
From: Peter G. Lane [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 2:37 PM
To: [EMAIL PROTECTED]
Subject: Re: DII code not working anymore/dynamic stub failing
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:38
9)
[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.j
ava: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>(BasicCoun
terAdder.java:83)
[java] at org.globus.ogsa.client.wsif.samples.BasicCounterAdder.main(BasicCounte
rAdder.java:101)
Thanks! Peter
