Can you post the rest of the WSDL please? On 5/31/07, Odysseas Bournas <[EMAIL PROTECTED]> wrote:
Hello all,I hope you can help me with this.. I am deploying a web service in Tomcat 6.0.13 and use Axis 1.4 to deal with the SOAP messages. I managed to deploy my service successfully and write a client that will invoke its methods. (I was given a WSDL and created the server skeletons with: WSDL2Java --server-side --skeletonDeploy true wsdlfile and the client stubs with: WSDL2Java wsdlfile ) However, upon invoking a method of the service, I get an IllegalArgumentException that I can not understand why. In more detail: The method I invoke is: _stub.read(new UnsignedLong(startOffset), new UnsignedInt(bytesPerBlock), new UnsignedInt(numBlocks), Long.valueOf(stride).longValue(), transferHolder); ,where _stub is the client's "local" stub, and the startOffset, numBlocks,stride variables are simple Strings. The client connects to the service, and then attempts to invoke the method. The exception I get is: Tried to invoke method public void localhost.random_access.bindings.RandomByteIOSOAPBindingSkeleton.read(org.apache.axis.types.UnsignedLong,org.apache.axis.types.UnsignedInt,org.apache.axis.types.UnsignedInt,long,localhost.byte_io.holders.TransferInformationTypeHolder ) throws java.rmi.RemoteException with arguments org.apache.axis.types.UnsignedLong,null,null,null,localhost.byte_io.holders.TransferInformationTypeHolder. The arguments do not match the signature.; nested exception is: java.lang.IllegalArgumentException at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at localhost.random_access.bindings.RandomByteIOSOAPBindingStub.read(RandomByteIOSOAPBindingStub.java:1006) at Client.read(Client.java:63) at Client.main(Client.java:172) For some reason the arguments: new UnsignedInt(numBlocks), new UnsignedInt(numBlocks), Long.valueOf(stride).longValue() are replaced with nulls by AXIS. The arguments are not null even until localhost.random_access.bindings.RandomByteIOSOAPBindingStub.read(RandomByteIOSOAPBindingStub.java:1006) I guess that this is some marshaling/unmarshaling issue This is the wsdl of the read operation: <xsd:element name="read"> <xsd:complexType> <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="1" name="start-offset" type="xsd:unsignedLong"/> <xsd:element maxOccurs="1" minOccurs="1" name="bytes-per-block" type="xsd:unsignedInt"/> <xsd:element maxOccurs="1" minOccurs="1" name="num-blocks" type="xsd:unsignedInt"/> <xsd:element maxOccurs="1" minOccurs="1" name="stride" type="xsd:long"/> <xsd:element maxOccurs="1" minOccurs="1" name="transfer-information" type="byteio:transfer-information-type"/> </xsd:sequence> </xsd:complexType> </xsd:element> Can someone figure out why this is happening and how to avoid it maybe? Thank you in advance, Odysseas
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
