Hi,

Earlier we were calling a web service over HTTP and one of the element was
encrypted and was working fine.

Now we need to invoke the web service over HTTPS and all elements are
encrypted using the previous key only. 

We have imported the certificate. But while calling the service we are
getting following exception. I am not getting any clue about this error. Any
help will be greately appreciated. 

ERROR STACK TRACE

Web Service general exception **** org.apache.axiom.om.OMException:
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[7,28]
Message:
http://www.w3.org/TR/1999/REC-xml-names-19990114#ElementPrefixUnbound?ns2&ns2:error
org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException:
ParseError at [row,col]:[7,28]
Message:
http://www.w3.org/TR/1999/REC-xml-names-19990114#ElementPrefixUnbound?ns2&ns2:error
        at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249)
        at
org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:307)
        at
org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.findNextElementWithQName(OMChildrenQNameIterator.java:96
)
        at
org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasNext(OMChildrenQNameIterator.java:76)
        at
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:251)
        at
org.apache.axiom.soap.impl.llom.soap11.SOAP11FaultImpl.getCode(SOAP11FaultImpl.java:124)
        at org.apache.axis2.AxisFault.initializeValues(AxisFault.java:202)
        at org.apache.axis2.AxisFault.(AxisFault.java:196)
        at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
        at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
        at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
        at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
        at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
        at SMSPinClient.smspin(SMSPinClient.java:81)
        at TestPinWS.main(TestPinWS.java:49)
Caused by: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[7,28]
Message:
http://www.w3.org/TR/1999/REC-xml-names-19990114#ElementPrefixUnbound?ns2&ns2:error
        at
com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown
Source)
        at
org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:506)
        at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:161)


CODE
operationClient = client.createClient(ServiceClient.ANON_OUT_IN_OP);
MessageContext outMsgCtx = new MessageContext();
Options opts = outMsgCtx.getOptions();
opts.setTo(new EndpointReference("https://URL";) );
opts.setAction("urn:org-com:secure_msg:msg_delivery");
opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED,"false");
opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.REUSE_HTTP_CLIENT,"true");
       
client.setOptions(opts);
SOAPEnvelope csEnv = createSMSPinPayLoad(arg1, arg2, arg3, arg4 , arg5);
outMsgCtx.setEnvelope(csEnv);
operationClient.addMessageContext(outMsgCtx);
operationClient.execute(true);

We are getting error from the last line of the code.

Thanks for your help. 

Best Regards - Roy
-- 
View this message in context: 
http://old.nabble.com/Getting-error-invoking-a-web-service-over-HTTPS-tp30295561p30295561.html
Sent from the Axis - User mailing list archive at Nabble.com.

Reply via email to