Hi all,
I'm running JBoss 4.0.5. I've a ws that must request a service to another.
I use the following code:
System.out.println("*** Requesting for a functional role");
ServiceClient client = new ServiceClient();
OperationClient operationClient =
client.createClient(ServiceClient.ANON_OUT_IN_OP);
MessageContext outMsgCtx = new MessageContext();
Options opts = outMsgCtx.getOptions();
opts.setTo(targetEPR);
opts.setAction("AttributeQuery");
SOAPFactory fac = OMAbstractFactory.getSOAP12Factory();
SOAPEnvelope envelope = fac.getDefaultEnvelope();
envelope.getBody().addChild(attributeRequestSigned);
System.err.println(envelope.toString());
outMsgCtx.setEnvelope(envelope);
operationClient.addMessageContext(outMsgCtx);
operationClient.execute(true);
// pass message label as method argument
MessageContext inMsgtCtx = operationClient.getMessageContext("In");
SOAPEnvelope response = inMsgtCtx.getEnvelope();
And I get the following error:
[AxisServlet] java.lang.NullPointerException
16:46:10,944 INFO [STDOUT] 238335 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.header - >> "POST
/axis2/services/SpiritAuthenticationAuthority HTTP/1.1[\r][\n]"
16:46:11,018 INFO [STDOUT] 238408 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.header - >> "Content-Type: application/soap+xml;
charset=UTF-8; action="AttributeQuery"[\r][\n]"
16:46:11,019 INFO [STDOUT] 238410 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.header - >> "User-Agent: Axis2[\r][\n]"
16:46:11,020 INFO [STDOUT] 238411 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.header - >> "Host: localhost:8080[\r][\n]"
16:46:11,021 INFO [STDOUT] 238412 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.header - >> "Transfer-Encoding: chunked[\r][\n]"
16:46:11,023 INFO [STDOUT] 238414 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.header - >> "[\r][\n]"
16:46:11,117 INFO [STDOUT] 238507 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "cd0[\r][\n]"
16:46:11,147 ERROR [AxisServlet] java.lang.NullPointerException
16:46:11,149 INFO [STDOUT] 238538 [http-0.0.0.0-8080-2] ERROR
org.apache.axis2.transport.http.AxisServlet -
java.lang.NullPointerException
16:46:11,194 INFO [STDOUT] 238585 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<?xml version='1.0'
encoding='UTF-8'?><soapenv:Envelope
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header><wsa:To>http://localhost:8080/axis2/services/SpiritAuthenticationAuthority</wsa:To><wsa:MessageID>urn:uuid:CA7A64DB85574468BC1188917168200</wsa:MessageID><wsa:Action>AttributeQuery</wsa:Action></soapenv:Header><soapenv:Body><samlp:AttributeQuery xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" Destination="http://www.tiani-spirit.com/XDSb" ID="_6f029d7955496c88da0467f33e8e1cb4" IssueInstant="2007-09-04T14:46:07.144Z" Version="2.0"><saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:SAML:2.0:nameid-format:entity" NameQualifier="http://www.tiani-spirit.com/XDS/NAMEQUALIFIER" SPNameQualifier="http://www.tiani-spirit.com/XDS/SPNameQualifier" SPProvidedID="spirit-xds-document-registry">http://www.tiani-spirit.com/XDSbDR</saml:Issuer><ds:Signature
xmlns:ds="http://www.w3.org/2000/09/xmldsig#">[\n]"
16:46:11,196 INFO [STDOUT] 238587 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:SignedInfo>[\n]"
16:46:11,197 INFO [STDOUT] 238588 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />[\n]"
16:46:11,198 INFO [STDOUT] 238589 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />[\n]"
16:46:11,199 INFO [STDOUT] 238590 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:Reference
URI="#_6f029d7955496c88da0467f33e8e1cb4">[\n]"
16:46:11,199 INFO [STDOUT] 238590 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:Transforms>[\n]"
16:46:11,200 INFO [STDOUT] 238591 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:Transform
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"
/>[\n]"
16:46:11,201 INFO [STDOUT] 238592 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"><ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="ds saml samlp"
/></ds:Transform>[\n]"
16:46:11,202 INFO [STDOUT] 238593 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "</ds:Transforms>[\n]"
16:46:11,203 INFO [STDOUT] 238594 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:DigestMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />[\n]"
16:46:11,204 INFO [STDOUT] 238595 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:DigestValue />[\n]"
16:46:11,205 INFO [STDOUT] 238596 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "</ds:Reference>[\n]"
16:46:11,205 INFO [STDOUT] 238596 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:Reference
URI="#_6f029d7955496c88da0467f33e8e1cb4">[\n]"
16:46:11,206 INFO [STDOUT] 238597 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:Transforms>[\n]"
16:46:11,207 INFO [STDOUT] 238598 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:Transform
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"
/>[\n]"
16:46:11,208 INFO [STDOUT] 238599 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"><ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="ds saml samlp"
/></ds:Transform>[\n]"
16:46:11,209 INFO [STDOUT] 238600 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "</ds:Transforms>[\n]"
16:46:11,210 INFO [STDOUT] 238601 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:DigestMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />[\n]"
16:46:11,217 INFO [STDOUT] 238607 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:DigestValue />[\n]"
16:46:11,318 INFO [STDOUT] 238709 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "</ds:Reference>[\n]"
16:46:11,319 INFO [STDOUT] 238710 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:Reference
URI="#_6f029d7955496c88da0467f33e8e1cb4">[\n]"
16:46:11,320 INFO [STDOUT] 238711 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:Transforms>[\n]"
16:46:11,322 INFO [STDOUT] 238713 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:Transform
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"
/>[\n]"
16:46:11,323 INFO [STDOUT] 238714 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"><ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="ds saml samlp"
/></ds:Transform>[\n]"
16:46:11,325 INFO [STDOUT] 238715 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "</ds:Transforms>[\n]"
16:46:11,325 INFO [STDOUT] 238716 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:DigestMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />[\n]"
16:46:11,326 INFO [STDOUT] 238717 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:DigestValue />[\n]"
16:46:11,327 INFO [STDOUT] 238718 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "</ds:Reference>[\n]"
16:46:11,327 INFO [STDOUT] 238718 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "</ds:SignedInfo>[\n]"
16:46:11,328 INFO [STDOUT] 238719 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "<ds:SignatureValue />[\n]"
16:46:11,329 INFO [STDOUT] 238720 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "</ds:Signature><saml:Subject
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"><saml:NameID>test1</saml:NameID></saml:Subject><saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" FriendlyName="User Email" Name="urn:oasis:names:tc:XACML:2.0:example:attribute:email" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" /><saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" FriendlyName="Functional Role" Name="urn:oasis:names:tc:XACML:2.0:example:attribute:role" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
/></samlp:AttributeQuery></soapenv:Body></soapenv:Envelope>"
16:46:11,336 INFO [STDOUT] 238727 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "[\r][\n]"
16:46:11,338 INFO [STDOUT] 238728 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "0"
16:46:11,339 INFO [STDOUT] 238730 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "[\r][\n]"
16:46:11,340 INFO [STDOUT] 238730 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.content - >> "[\r][\n]"
16:46:11,389 INFO [STDOUT] 238779 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.header - << "HTTP/1.1 400 Bad Request[\r][\n]"
16:46:11,395 INFO [STDOUT] 238786 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.header - << "Server: Apache-Coyote/1.1[\r][\n]"
16:46:11,396 INFO [STDOUT] 238787 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.header - << "X-Powered-By: Servlet 2.4;
JBoss-4.0.5.GA (build: CVSTag=Branch_4_0
date=200610162339)/Tomcat-5.5[\r][\n]"
16:46:11,397 INFO [STDOUT] 238788 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.header - << "Content-Type: application/soap+xml;
action="http://www.w3.org/2005/08/addressing/soap/fault";charset=UTF-8[\r][\n]"
16:46:11,398 INFO [STDOUT] 238789 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.header - << "Transfer-Encoding: chunked[\r][\n]"
16:46:11,400 INFO [STDOUT] 238791 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.header - << "Date: Tue, 04 Sep 2007 14:46:11
GMT[\r][\n]"
16:46:11,401 INFO [STDOUT] 238792 [http-0.0.0.0-8080-3] DEBUG
httpclient.wire.header - << "Connection: close[\r][\n]"
16:46:11,533 ERROR [STDERR] Erroaccio: Transport error: 400 Error: Bad Request
16:46:11,535 INFO [STDOUT] 238924 [http-0.0.0.0-8080-3] ERROR STDERR - Err
The number of available web services, at each request, increases, like this:
anonService1
Service EPR : http://localhost:8080/axis2/services/anonService1
Service Description : No description available for this service
Service Status : Active
Engaged modules for the service
addressing-1.2 :: Disengage
soapmonitor-1.2 :: Disengage
rampart-1.2 :: Disengage
Available operations
anonOutonlyOp
Engaged Modules for the Operation
addressing-1.2 :: Disengage
soapmonitor-1.2 :: Disengage
rampart-1.2 :: Disengage
anonRobustOp
Engaged Modules for the Operation
addressing-1.2 :: Disengage
soapmonitor-1.2 :: Disengage
rampart-1.2 :: Disengage
anonOutInOp
Engaged Modules for the Operation
addressing-1.2 :: Disengage
soapmonitor-1.2 :: Disengage
rampart-1.2 :: Disengage
Have you any ideas?
Thanks,
Massimiliano
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]