[jboss-user] [JBoss jBPM] - Re: invoke called, but our invoker is disconnected
bertrand.njiipwo
do-not-reply at jboss.com
Tue Jan 9 19:17:24 EST 2007
Hello Alex,
I have chosed the second alternative. I was trying to let the jbpm.bpel module to read the received SOAPMessage:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
| <SOAP-ENV:Body>
| <m:apply xmlns:m="urn:samples:loanapproval">
| <loanRequestParameters>
| <firstName>Bertrand</firstName>
| <lastName>Njipwo</lastName>
| <amount>1000</amount>
| </loanRequestParameters>
| </m:apply>
| </SOAP-ENV:Body>
| </SOAP-ENV:Envelope>
In PortConsumer.java the following lines:
SOAPElement operationElem = XmlUtil.getElement(envelope.getBody());
| Map outputParts = new HashMap();
| // fill in part values
| Iterator partIt = parts.iterator();
| while (partIt.hasNext()) {
| Part part = (Part) partIt.next();
| String partName = part.getName();
| // get part accessor from operation wrapper
| SOAPElement operPartAccessor = XmlUtil.getElement(operationElem, partName);
| // create part accessor in output message
| Element outputPartAccessor = XmlUtil.createElement(null, partName);
| outputParts.put(partName, outputPartAccessor);
| // copy operation part to output part
| operPartAccessor.getValue();
| XmlUtil.copy(outputPartAccessor, operPartAccessor);
| }
| return outputParts;
|
will copy the informations of the SOAPElement operPartAcessor to the outputPartAccessor and therefore retrieve the value received from the remote service and with that value initialise the outputPartAccessor-object.
But i'm falling at: XmlUtil.copy(outputPartAccessor, operPartAccessor);
If i call any methode on operPartAccessor it raises a NullpointerException.
That why after this call the highlighted methodes also throw the same Exception.
public static void copy(Element target, SOAPElement source) {
| // attributes
| removeAttributes(target);
| copyAttributes(target, source);
| // all namespaces
| copyVisibleNamespaces(target, source);
| // child nodes
| removeChildNodes(target);
| copyChildNodes(target, source);
| if (log.isTraceEnabled()) log.trace("copied element: " + source.getNodeName());
| }
So copyAttributes will fail because the SOAPElement operPartAccessor has no Attributes. One question: (Which methode give the value of the operPartAccessort ? I have tried with to manipulate the operPartAccessort as DOM object by call getChildrens(), but its always fail).
My question is how could i get the value true of true in the following message send by the remote server: <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>
| <validCustomerResponse xmlns="urn:samples:schufa">
| <validCustomerReturn>true</validCustomerReturn>
| </validCustomerResponse>
| </soapenv:Body>
| </soapenv:Envelope>
I have comment out the following line in PortConsumer.java: XmlUtil.copy(outputPartAccessor, operPartAccessor); so i can achieve a "cleaned" process excecution and so i can make some performance measurements during the process execution. This is a temporary solution to be able to work. After doing this i become the following message:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
| <env:Header/>
| <env:Body>
| <m:applyResponse xmlns:m="urn:examples:loanapproval">
| <loanResponse>
| <approved/>
| </loanResponse>
| </m:applyResponse>
| </env:Body>
| </env:Envelope>
Alex why i can't copy the desired value the remote service send me in my BPEL process.
Thanks once again for your help and the time you invest.
Regards
Bertrand
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999710#3999710
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999710
More information about the jboss-user
mailing list