Hi all,

after updating to the last nightly build (my previous version was quite
outdated) I've found out this error:

     [java] ERROR Repository:initRepository Unable to send the set of
services to the router: HTTP Transport error: '400' - 'Bad Request';
nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'; nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'; nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'
     [java] ERROR: Unable to send the set of services to the router:
HTTP Transport error: '400' - 'Bad Request'; nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'; nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'; nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'
     [java] ERROR Repository:initRepository org.apache.axis2.AxisFault:
HTTP Transport error: '400' - 'Bad Request'; nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'; nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'; nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'
     [java]     at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:219)
     [java]     at
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:526)
     [java]     at
org.apache.axis2.description.OutOnlyAxisOperationClient.execute(OutOnlyAxisOperation.java:250)
     [java]     at
ncl.qosp.codestore.SOAPHelper.sendAddedServiceMsg(SOAPHelper.java:125)
     [java]     at
ncl.qosp.codestore.Repository.initRepository(Repository.java:92)
     [java]     at
ncl.qosp.codestore.socket.CodestoreServer.run(CodestoreServer.java:296)
     [java]     at java.lang.Thread.run(Thread.java:595)
     [java] Caused by: org.apache.axis2.AxisFault: HTTP Transport error:
'400' - 'Bad Request'; nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'
     [java]     at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:321)
     [java]     at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:196)
     [java]     ... 6 more
     [java] Caused by: org.apache.axis2.AxisFault: HTTP Transport error:
'400' - 'Bad Request'
     [java]     at
org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:130)
     [java]     at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:311)
     [java]     ... 7 more
     [java]
     [java] ERROR: org.apache.axis2.AxisFault: HTTP Transport error:
'400' - 'Bad Request'; nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'; nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'; nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'
     [java]     at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:219)
     [java]     at
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:526)
     [java]     at
org.apache.axis2.description.OutOnlyAxisOperationClient.execute(OutOnlyAxisOperation.java:250)
     [java]     at
ncl.qosp.codestore.SOAPHelper.sendAddedServiceMsg(SOAPHelper.java:125)
     [java]     at
ncl.qosp.codestore.Repository.initRepository(Repository.java:92)
     [java]     at
ncl.qosp.codestore.socket.CodestoreServer.run(CodestoreServer.java:296)
     [java]     at java.lang.Thread.run(Thread.java:595)
     [java] Caused by: org.apache.axis2.AxisFault: HTTP Transport error:
'400' - 'Bad Request'; nested exception is:
     [java]     org.apache.axis2.AxisFault: HTTP Transport error: '400'
- 'Bad Request'
     [java]     at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:321)
     [java]     at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:196)
     [java]     ... 6 more
     [java] Caused by: org.apache.axis2.AxisFault: HTTP Transport error:
'400' - 'Bad Request'
     [java]     at
org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:130)
     [java]     at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:311)
     [java]     ... 7 more


The error happens on the OperationClient.execute(true) call. The used
code is:
Options options = new Options();
                options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
                
ServiceClient sender = new ServiceClient();
EndpointReference managerEPR = 
        new EndpointReference(System.getProperty("qosp.manager.epr"));
        
                
OperationClient mepClient =
sender.createClient(ServiceClient.ANON_OUT_ONLY_OP);    
mepClient.setOptions(options);
        
SOAPEnvelope env = createEnvelope(addedServices);
        
MessageContext ctx = new MessageContext();
ctx.setEnvelope(env);           
ctx.setWSAAction(ActionConstants.ADD_SERVICE_ACTION);
ctx.setTo(managerEPR);                  
                
mepClient.addMessageContext(ctx);
mepClient.execute(true);
mepClient.complete(ctx);




createEnvelope() does the following:

private static final SOAPEnvelope createEnvelope(final Set<String>
addedServices) {
        SOAPEnvelope env = factory.createSOAPEnvelope();
        SOAPHeader header = factory.createSOAPHeader();
        SOAPHeaderBlock block = factory.createSOAPHeaderBlock(
        SOAPHeaderConstants.ELEM_QOSP_HEADER_BLOCK, omNs);
        OMElement type = factory.createOMElement(
        SOAPHeaderConstants.ELEM_MESSAGE_TYPE, omNs);
        type.setText(MessageType.NEW_SERVICE.value());
                
        block.addChild(type);
        header.addChild(block);
                
        SOAPBody body = factory.createSOAPBody();
        OMElement method =      
factory.createOMElement(SOAPConstants.ADD_SERVICE,
omNs);
                
        // Adds all services specified as method argument
        for (Iterator<String> i = addedServices.iterator(); i.hasNext(); ) {
                OMElement value1 = factory.createOMElement("name", omNs);
                value1.addChild(factory.createOMText(i.next()));
                method.addChild(value1);
        }               
                
        body.addChild(method);
                
        env.addChild(header);
        env.addChild(body);
                
        return env;
}       //-- createEnvelope()


Everything used to work fine and I didn't make any change to this code.
Any idea?


Thanks,
Michele
                





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to