Re: Axis2 1.4 How to modify soap envelope attributes?



zigzagdna@xxxxxxxxx wrote:
On Aug 8, 6:14 pm, "Mike Schilling" <mscottschill...@xxxxxxxxxxx>
wrote:
zigzag...@xxxxxxxxx wrote:
On Aug 8, 5:47 pm, "Mike Schilling" <mscottschill...@xxxxxxxxxxx>
wrote:
zigzag...@xxxxxxxxx wrote:
I am using AXIS 2 1.4. I have written a client using AXIS2 which
calls
a =
third party web service written using Webmethods (not AXIS).
I am using AXIOM API. When I look at the SOAP message sent:
<?xml version=3D'1.0' encoding=3D'UTF-8'?>
<soapenv:Envelope =
xmlns:soapenv=3D"http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Body><tns:TestRPC =
xmlns:tns=3D"http://10.35.16.31/";><tns:Input1>test100</tns:Input1></
tns:T=
estRPC></soapenv:Body></soapenv:Envelope>
It only has
xmlns:soapenv=3D"http://schemas.xmlsoap.org/soap/envelope
in =
SOAP Enevelope.=20
I want to add xsd and xsi namespaces
<soapenv:Envelope =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"; =
xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"; =
xmlns:soapenv=3D"http://schemas.xmlsoap.org/soap/envelope/"; =
xmlns:pu0=3D"http://10.35.16.31/
PU023_QM_TrackWise_V1.TrackWise_to_SAP.ma=
ps">

How do I do it using AXIOM API. Apprecaite any pointers.

If anything in the message needs the xsi or xsd namespaces,
they'll
already be defined. If not, they serve no purpose. What are you
trying to accomplish?- Hide quoted text -

- Show quoted text -

Thanks. Not sure what you mean by alreday defined. I am writing
client
code from Scartch using AXIOM. By default it does not include xsd
and
xsi namespaces.

OMElement helloWorldPayload = helloWorldPayload("test1234");
Options options = new Options();
System.out.println("getSoapVersionURI:" +
options.getSoapVersionURI());
options.setTo(targetEPR);

options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
ServiceClient sender = new ServiceClient();

sender.setOptions(options);
sender.sendReceive(helloWorldPayload);

when I use tcpmon to see messages going thorugh, it does not show
xsd
and xsi namespaces.., so they are no part of SOAP message sent by
AXIS2, but my third party web service requires them.

That's what I don't understand. The only way a web service would
reuire namespaces to be defined is if something (an element or an
attribute) is in that namespace, but if that were true, the
namespaces would already be defined. Let me take a wild guess: is
the problem that your web service uses soap encoding, but the
client
is producing a literal message?- Hide quoted text -

- Show quoted text -
You are right. Server is written in Webmethods which is using SOAP
RPC
(encoding). I am trying to call it from AXIS2 which bprobaly uses
default style.

There are three styles commonly used:

1. rpc-encoded
2. document-literal
3. rpc-literal

If youe aervice expects to see the namespaces xsd: and xsi:, it's
probably using 1 AXIS should figure this out from the WSDL, but if it
isn't, there may be hints you can give it during the generation
process.


.



Relevant Pages

  • Re: Axis2 1.4 How to modify soap envelope attributes?
    ... When I look at the SOAP message sent: ... I want to add xsd and xsi namespaces ... but my third party web service requires them. ...
    (comp.lang.java.programmer)
  • Re: Axis2 1.4 How to modify soap envelope attributes?
    ... When I look at the SOAP message sent: ... I want to add xsd and xsi namespaces ... If anything in the message needs the xsi or xsd namespaces, ... but my third party web service requires them. ...
    (comp.lang.java.programmer)
  • Re: namespace?
    ... Honestly I think if the standard for web service namespaces was ACME/employees/HR instead of http://www.ACME.com/employees/HR it would have made more sense to me as it doesn't carry the connotation that it's a web address. ... The reason for needing namespaces in XML is because the very nature of XML allows you to make up tag and attribute names yourself based on the data you will be passing. ... The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Web Services and COBOL (Fairly long post, but I dont have time to write a proper article on it)
    ... Web Service is a great prerequisite for automated client-side code ... generation in the mainstream Java and .NET SOAP frameworks. ... $set Repository Update ... 000464 12 objSOAPClient OBJECT REFERENCE. ...
    (comp.lang.cobol)
  • RE: Web service issue
    ... We use XML serialization (from the .net ... If you need to populate fields with a default value and you're using SOAP, ... | Thread-Topic: Web service issue ... |> I've basically got an orchestration that is exposes a port as a web ...
    (microsoft.public.biztalk.general)