Hi,

Just set in your wsdd file :

<service name="myServiceName" provider="java:RPC" style="wrapped">

The "wrapped" should get rid of the types in the envelop, at least it did
when i
changed it.

Greetings,
Leo de Blaauw

-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag, juni 2003 9:14
Aan: [EMAIL PROTECTED]
Onderwerp: xsi-type - Desperate to get rid of it.


Hi,

I'm calling a .NET web service using Axis client code.  I'm desperately
trying to find out if it is possible to remove the xsi:type from the
envelope.  I've read so many messages on the Axis groups about this issue,
and as other posters have done, I've tried unsuccessfully to disable the
sending of this attribute in many ways, including (individually and using
various combinations of) the following:

call.setOption(Call.SEND_TYPE_ATTR,Boolean.FALSE);
call.setProperty(Call.SEND_TYPE_ATTR,Boolean.FALSE);
call.setScopedProperty(Call.SEND_TYPE_ATTR,Boolean.FALSE);
call.setOption(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
call.setProperty(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
call.setScopedProperty(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
call.getMessageContext
().setProperty(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
call.getService().getAxisEngine
().setOption(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);

None of these actually remove the xsi:type from all the fields.

I've also read from one poster that this is a bug, and from another that
only some types of parameters will allow this removal.  Surely int and long
parameters don't need it, or the successful .NET client (to the same web
service), which doesn't set the xsi:type would fail.  One thing is for
sure, though: the only difference between what gets sent from the
unsuccessful Axis client and what gets sent from the successful .NET client
is the xsi:type attributes on the parameters.

Those people who've posted about this in the past - how did you solve it?
Anybody else have any ideas?  I'll paste in what the Axis client is sending
below.  And below that I'll post in the returned error.

Ian

<?xml version="1.0" encoding="UTF-8" ?>
 <soapenv:Envelope xmlns:soapenv
="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd
="http://www.w3.org/2001/XMLSchema"; xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance";>
 <soapenv:Body>
 <doBlah xmlns="http://tempuri.org";>
  <requestNumber xsi:type="xsd:long">1</requestNumber>
  <someId xsi:type="xsd:int">1</someId>
<xmlData>[snip]</xmlData>
  </doBlah>
  </soapenv:Body>
  </soapenv:Envelope>

System.Web.Services.Protocols.SoapException: Server was unable to process
request. ---&gt; System.ArgumentNullException: Array cannot be null.
Parameter name: bytes
   at System.Text.ASCIIEncoding.GetString(Byte[] bytes)
   --- End of inner exception stack trace ---
        at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:2
51)
        at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:16
8)
        at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.java:1015)
        at
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.jav
a:568)
        at
org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XMLNamespaceBinde
r.java:853)
        at
org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java
:643)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.
java:3006)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:9
30)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDo
cumentFragmentScannerImpl.java:1145)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu
mentFragmentScannerImpl.java:988)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1446)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:333)
        at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:525)
        at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:581)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
        at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:115
7)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:242)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2545)
        at org.apache.axis.client.Call.invoke(Call.java:2515)
        at org.apache.axis.client.Call.invoke(Call.java:2210)
        at org.apache.axis.client.Call.invoke(Call.java:2133)
        at org.apache.axis.client.Call.invoke(Call.java:1656)
        at MyInterfaceClient.doBlah(MyInterfaceClient.java:98)

Reply via email to