I'm new to Axis nad I would like to change the default ns1 namespace prefix to something else when generating SOAP XML. I'm using version 1.4 and here is the code that I'm testing (just the Call section):
Call call = (Call)service.createCall();
call.initialize();
call.setSOAPActionURI("urn:oasis:names:tc:SAML:1.1:protocol#Request");
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new QName("urn:oasis:names:tc:SAML:1.1:protocol", "Request", "samlp"));
call.addParameter("AssertionArtifact", XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnType(XMLType.XSD_STRING);
String ret = (String) call.invoke(new Object[] { "rebh3eayWC2MccWP1R76" });
As you can see in QName I give the prefix "samlp". This is what it generates:
<?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>
<ns1:Request soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:oasis:names:tc:SAML:1.1:protocol">
<AssertionArtifact xsi:type="xsd:string">rebh3eayWC2MccWP1R76</AssertionArtifact>
</ns1:Request>
</soapenv:Body>
</soapenv:Envelope>
It shows the default "ns1" instead of "samlp". Is there a way to add this prefix also to the "AssertionArtifact" tag?