Hi all
 
I have a generic webclient build in axis to be able to interact with whichever webserivce it is pointed at.  It has worked against several services in the past but on trying to hook up with a new webservice I'm getting an error message that I don't really understand.  On looking up the error message it seems to be somehow linked to X509 certificates but, while there is a certificate in my Java keystore to allow SSL interaction with the webservice, the (extensive, if not very helpful) documentation I have for the webservice makes no mention of having to sign or encrypt or give tokens with messages to the operation I'm trying to use (other operations do require tokens and the documentation says as much).  The web service is .Net based, which I know because the administrators of it can't help me with my problem due to knowing nothing about Java.
 
Anyway, the relevant parts of my client code are very straight forward as follows:
 
ServiceFactory serviceFactory = ServiceFactory.newInstance();
webService = serviceFactory.createService(wsdlUrl, serviceQName);
...
Call opCall = webService.createCall(portQName, operationName);
...
opCall.invoke(values);
 
where values is an object array of the parameters to be passed.
 
The relevant parts of the WSDL I'm running against are:
 
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:GSO-System-Services:external:1.65:PortalInterface" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="urn:GSO-System-Services:external:1.65:PortalInterface" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="urn:GSO-System-Services:external:1.65:PortalInterface">
      <s:element name="GsoRegisterPrincipalUserID">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="inputXml" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GsoRegisterPrincipalUserIDResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="outputXml" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
 
  <wsdl:message name="GsoRegisterPrincipalUserIDSoapIn">
    <wsdl:part name="parameters" element="tns:GsoRegisterPrincipalUserID" />
  </wsdl:message>
  <wsdl:message name="GsoRegisterPrincipalUserIDSoapOut">
    <wsdl:part name="parameters" element="tns:GsoRegisterPrincipalUserIDResponse" />
  </wsdl:message>
 
  <wsdl:portType name="GatewaySoapPortalSoap">
    <wsdl:operation name="GsoRegisterPrincipalUserID">
      <wsdl:input message="tns:GsoRegisterPrincipalUserIDSoapIn" />
      <wsdl:output message="tns:GsoRegisterPrincipalUserIDSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
 
  <wsdl:binding name="GatewaySoapPortalSoap" type="tns:GatewaySoapPortalSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    <wsdl:operation name="GsoRegisterPrincipalUserID">
      <soap:operation soapAction="urn:GSO-System-Services:external:1.65:PortalInterface/GsoRegisterPrincipalUserID" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
 
  <wsdl:service name="GatewaySoapPortal">
    <wsdl:port name="GatewaySoapPortalSoap" binding="tns:GatewaySoapPortalSoap">
      <soap:address location="https://secure.gateway.gov.vm/SOAP/Portal/GatewaySoapPortal.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
 
 
So, I'm making a call against the operation named RegisterPrincipalUserID and recieving the following error message in repsonse:
 
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
 faultSubcode:
 faultString: WSE402: The message does not conform to the policy it was mapped to.
 faultActor: urn:GSO-System-Services:external:1.65:PortalInterface
 faultNode:
 faultDetail:
 {http://xml.apache.org/axis/}stackTrace:WSE402: The message does not conform to the policy it was mapped to.
 at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
 at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
 at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
 at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
 at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at javax.xml.parsers.SAXParser.parse(Unknown Source)
 at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
 at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
 at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
 at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
 at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
 at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
 at org.apache.axis.client.Call.invoke(Call.java:2748)
 at org.apache.axis.client.Call.invoke(Call.java:2424)
 at org.apache.axis.client.Call.invoke(Call.java:2347)
 at org.apache.axis.client.Call.invoke(Call.java:1804)
 at govConnect.WebServiceTools.call(WebServiceTools.java:177)
 at govConnect.WebServiceTools.call(WebServiceTools.java:95)
 at govConnect.GovConnect.register(GovConnect.java:77)
 at govConnect.Tests.service(Tests.java:17)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
 at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:419)
 at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:133)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
 at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
 at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
 at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
 at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
 at java.lang.Thread.run(Thread.java:536)
 
 {http://xml.apache.org/axis/}hostname:server
 
Can anyone help me with what might be causeing the fault, does it imply that my messages do have to be signed/encrypted or could something else be the problem?  Thanks.

Chris Mannion
IT Junction
020 8452 4274

Reply via email to