Query fromQuery = BPELFactory.eINSTANCE.createQuery();
fromQuery.setValue(xpath.evaluate());
fromQuery.setQueryLanguage(XPATH_NAMESPACE);
from.setQuery(fromQuery);
To to = BPELFactory.eINSTANCE.createTo();
to.setVariable(variable);
Query toQuery = BPELFactory.eINSTANCE.createQuery();
toQuery.setQueryLanguage(XPATH_NAMESPACE);
javax.jws.soap.SOAPBinding soapBinding = operationSoapBindingMap.get(operation);
Message message = null;
javax.wsdl.Fault f = operation.getFault(type.getName());
if (f != null){
message = (org.eclipse.wst.wsdl.Message)f.getMessage();
} else {
javax.wsdl.Output output = operation.getOutput();
if (output != null)
message = (org.eclipse.wst.wsdl.Message)output.getMessage();
}
if (message != null){
List<Part> msgParts = message.getOrderedParts(null);
if (soapBinding == null ||
(soapBinding != null &&
soapBinding.style() == javax.jws.soap.SOAPBinding.Style.DOCUMENT &&
soapBinding.use() == javax.jws.soap.SOAPBinding.Use.LITERAL &&
soapBinding.parameterStyle() == javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED)){
//XSDElementDeclaration el = wsdlDocLitWrapResultMap.get(operation);
//toQuery.setValue("$" + tmp.getName() + "." + msgParts.get(0).getName() + "/" + this.schemaNsPrefixMap.get(el.getTargetNamespace()) + ":" + el.getQName());
to.setPart(msgParts.get(0));
//toQuery.setValue("/" + this.schemaNsPrefixMap.get(el.getTargetNamespace()) + ":" + el.getQName());
//to.setQuery(toQuery);
} else if (soapBinding != null &&
soapBinding.style() == javax.jws.soap.SOAPBinding.Style.RPC &&
soapBinding.use() == javax.jws.soap.SOAPBinding.Use.LITERAL){
//toQuery.setValue("$" + tmp.getName() + "." + msgParts.get(0).getName());
to.setPart(msgParts.get(0));
}
Copy copy = BPELFactory.eINSTANCE.createCopy();
copy.setFrom(from);
copy.setTo(to);