Hi Ian,

did you manage to get rid of the xsi-type entries in the soap envelope ?
I am still looking for an answer how to remove the 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
attributes from the envelope.

Thanks,
Thomas 

> -----Urspr�ngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Gesendet am: Dienstag, 10. Juni 2003 09:27
> An: [EMAIL PROTECTED]
> Betreff: RE: xsi-type - Desperate to get rid of it.
> 
> 
> Wow, quick response - thanks.  But I'm only calling from client code,
> there's no wsdd.  How do I set it to be wrapped in that case?
> 
> Here's a snippet of how my client code works at present:
> Service  service = new Service();
> Call     call    = (Call) service.createCall();
> call.setTargetEndpointAddress( new java.net.URL(endpoint) );
> call.setOperationName(new QName("http://tempuri.org";, "doBlah"));
> call.setSOAPActionURI("http://tempuri.org/doBlah";);
> call.getService().getEngine
> ().setOption(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
> call.addParameter(new QName("http://tempuri.org";, "requestNumber"),
> org.apache.axis.Constants.XSD_LONG,javax.xml.rpc.ParameterMode.IN);
> call.addParameter(new QName("http://tempuri.org";, "someId"),
> org.apache.axis.Constants.XSD_INT,javax.xml.rpc.ParameterMode.IN);
> call.addParameter(new QName("http://tempuri.org";,
> "xmlData"),org.apache.axis.Constants.XSD_BASE64,javax.xml.rpc.
> ParameterMode.IN);
> call.setReturnType(org.apache.axis.Constants.XSD_ANYTYPE);
> call.setEncodingStyle(null);
> System.out.println("about to invoke, xmlData.getBytes is " +
> (xmlData.getBytes()==null ? "" : "not ") + "null");
> returnVal = (Integer) call.invoke( new Object[] { new 
> Long(requestNumber),
> new Integer(someId),xmlData.getBytes() } );
> 
> cheers,
> Ian
> 
> 
> 
>                                                               
>                                                               
>                     Leo de Blaauw                             
>                                                               
>                     <[EMAIL PROTECTED]        To:     
> "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>         
>              
>                     a.nl>                cc:                  
>                                                               
>                                          Subject:     RE: 
> xsi-type - Desperate to get rid of it.                            
>                     06/10/03                                  
>                                                               
>                     03:16 PM                                  
>                                                               
>                     Please                                    
>                                                               
>                     respond to                                
>                                                               
>                     axis-user                                 
>                                                               
>                                                               
>                                                               
>                                                               
>                                                               
> 
> 
> 
> 
> 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(SOAPFault
> Builder.java:2
> 
> 51)
>         at
> org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultB
> uilder.java:16
> 
> 8)
>         at
> org.apache.axis.encoding.DeserializationContextImpl.endElement
> (Deserializati
> 
> onContextImpl.java:1015)
>         at
> org.apache.xerces.parsers.AbstractSAXParser.endElement(Abstrac
> tSAXParser.jav
> 
> a:568)
>         at
> org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XML
> NamespaceBinde
> 
> r.java:853)
>         at
> org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamesp
> aceBinder.java
> 
> :643)
>         at
> org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XM
> LDTDValidator.
> 
> java:3006)
>         at
> org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDVa
> lidator.java:9
> 
> 30)
>         at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEn
> dElement(XMLDo
> 
> cumentFragmentScannerImpl.java:1145)
>         at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndE
> lement(XMLDocu
> 
> mentFragmentScannerImpl.java:988)
>         at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragment
> ContentDispatc
> 
> her.dispatch(XMLDocumentFragmentScannerImpl.java:1446)
>         at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocu
> ment(XMLDocume
> 
> ntFragmentScannerImpl.java:333)
>         at
> org.apache.xerces.parsers.StandardParserConfiguration.parse(St
> andardParserCo
> 
> nfiguration.java:525)
>         at
> org.apache.xerces.parsers.StandardParserConfiguration.parse(St
> andardParserCo
> 
> nfiguration.java:581)
>         at 
> org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
>         at
> org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXP
> arser.java:115
> 
> 7)
>         at javax.xml.parsers.SAXParser.parse(Unknown Source)
>         at
> org.apache.axis.encoding.DeserializationContextImpl.parse(Dese
> rializationCon
> 
> 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