David:
This is the part of my code where the call is made:
SOAPEnvelope env = new SOAPEnvelope();
try{
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL( ...servername... ));
SOAPBodyElement bodyDoc = new SOAPBodyElement(
current_document.getDocumentElement() );
env.addBodyElement( new RPCElement( ...WebServiceName...,
...methodName..., new Object[] { }) );
env.addBodyElement( bodyDoc );
SOAPEnvelope retEnv = call.invoke( env );
}catch...
I think you might wonder where this variable current_document comes from.
This is the crucial point, isn't it? It is created like this:
DocumentBuilderFactory aDocumentBuilderFactory =
DocumentBuilderFactory.newInstance();
DocumentBuilder aDocumentBuilder =
aDocumentBuilderFactory.newDocumentBuilder();
current_document = aDocumentBuilder.newDocument();
Element x_insurance = (Element)current_document.appendChild(
current_document.createElement( "Insurance" ) );
x_insurance.setAttribute( "Name", ...aname... );
Node x_basics = x_insurance.appendChild( current_document.createElement(
"Basics" ));
Node x_policyDetails = x_basics.appendChild(
current_document.createElement( "PolicyDetails" ));
Node x_allocate = x_policyDetails.appendChild(
current_document.createElement( "Allocate" ));
x_allocate.appendChild( current_document.createTextNode( "FALSE" ) );
Node x_plannr = x_policyDetails.appendChild(
current_document.createElement( "PlanNr" ));
x_plannr.appendChild( current_document.createTextNode( "123456" ) );
Node x_plantype = x_policyDetails.appendChild(
current_document.createElement( "PlanType" ));
x_plantype.appendChild( current_document.createTextNode( ...anytype... )
);
Maybe this already helps. If you need more information, please reply.
Matt
> -----Original Message-----
> From: David Owens [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 3:26 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Removing xsi types from xml.
>
>
> Matthias,
>
> Yes, that is exactly what I am trying to do. I have actually
> gotten the
> server side not to send the xsi types (by setting sendXsiTypes="false"
> as a parameter in the global configuration) but the client
> doesn't seem
> to know how to deal with it. I have set the same parameter in the
> client-config file.
>
> Any help is greatly appreciated.
>
> Thanks!
>
> |)ave
> [EMAIL PROTECTED]
>
> On Tue, 2002-07-09 at 12:40, Wimmer, Matthias wrote:
> > David:
> >
> > I copied you a small part of the stuff that my system is
> exchanging. It's a
> > call by SOAP-RPC. As you can see, in the upper part there
> are no xsi:type
> > attributes. If this is what you are looking for, I can send
> you the code.
> >
> > Matthias Wimmer
> >
> >
> > <SOAP-ENV:Envelope
> > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > <SOAP-ENV:Body>
> > <Insurance Name="bim">
> > <Benefits>
> > <Copay>ENTER</Copay>
> > <Select>
> > <Type>DEDUCTIBLE</Type>
> > <Period>HOUR</Period>
> > </Select>
> > <Enter>
> > <Amount>100</Amount>
> > <Period>DAY</Period>
> > </Enter>
> > <Coinsurance>101</Coinsurance>
> > </Benefits>
> > </Insurance>
> >
> > <ns1:retrieveBenefitsResponse
> >
> > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:ns1="InsuranceWebService">
> > <retrieveBenefitsReturn
> > xsi:type="xsd:string">ok</retrieveBenefitsReturn>
> > </ns1:retrieveBenefitsResponse>
> > </SOAP-ENV:Body>
> > </SOAP-ENV:Envelope>
> >
> > > -----Original Message-----
> > > From: David Owens [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, July 09, 2002 12:20 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Removing xsi types from xml.
> > >
> > >
> > > Hi all!
> > >
> > > Right now I am sending xml from axis to axis and I am trying to
> > > decrease the xml size. I changed the configuration on both
> > > the client and server to NOT send xsi types. It worked, in that
> > > the server stopped sending the xsi type, but it blew up on
> > > the client.
> > >
> > > Has anyone else used this feature axis to axis?
> > > Does anyone know if it is supposed to work?
> > >
> > > Thanks in Advance!
> > >
> > > |)ave
> > > [EMAIL PROTECTED]
> > >
> --
> And in my spare time, I think I'll write some code.
>