|
Lines 66-73
Link Here
|
| 66 |
import org.eclipse.wst.wsdl.PortType; |
66 |
import org.eclipse.wst.wsdl.PortType; |
| 67 |
import org.eclipse.wst.wsdl.Types; |
67 |
import org.eclipse.wst.wsdl.Types; |
| 68 |
import org.eclipse.wst.wsdl.WSDLFactory; |
68 |
import org.eclipse.wst.wsdl.WSDLFactory; |
| 69 |
import org.eclipse.wst.wsdl.internal.impl.InputImpl; |
|
|
| 70 |
import org.eclipse.wst.wsdl.internal.impl.OutputImpl; |
| 71 |
import org.eclipse.wst.wsdl.util.WSDLConstants; |
69 |
import org.eclipse.wst.wsdl.util.WSDLConstants; |
| 72 |
import org.eclipse.xsd.XSDAnnotation; |
70 |
import org.eclipse.xsd.XSDAnnotation; |
| 73 |
import org.eclipse.xsd.XSDComplexTypeDefinition; |
71 |
import org.eclipse.xsd.XSDComplexTypeDefinition; |
|
Lines 608-640
Link Here
|
| 608 |
List importFaults = importOp.getEFaults(); |
606 |
List importFaults = importOp.getEFaults(); |
| 609 |
|
607 |
|
| 610 |
if (importInput != null) { |
608 |
if (importInput != null) { |
| 611 |
InputImpl newInput = (InputImpl) WSDLFactory.eINSTANCE.createInput(); |
609 |
Input newInput = WSDLFactory.eINSTANCE.createInput(); |
| 612 |
newInput.setEnclosingDefinition(_wsdlCapDefinition); |
610 |
newInput.setEnclosingDefinition(_wsdlCapDefinition); |
| 613 |
Element element = newInput.createElement(); |
611 |
if(importInput.getName()!=null) |
| 614 |
if(importInput.getName()!=null) |
612 |
newInput.setName(importInput.getName()); |
| 615 |
newInput.setName(importInput.getName()); |
613 |
newInput.setEMessage(importInput.getEMessage()); |
| 616 |
newInput.setEMessage(importInput.getEMessage()); |
614 |
newOperation.setEInput(newInput); |
| 617 |
WsdlUtils.createOrFindPrefix(_wsdlCapDefinition, WsdmConstants.WSA_URI, WsdmConstants.WSA_PREFIX); |
615 |
WsdlUtils.createOrFindPrefix(_wsdlCapDefinition, WsdmConstants.WSA_URI, WsdmConstants.WSA_PREFIX); |
| 618 |
String opName = importOp.getName(); |
616 |
String opName = importOp.getName(); |
| 619 |
opName = opName.substring(0, 1).toUpperCase() + opName.substring(1); |
617 |
opName = opName.substring(0, 1).toUpperCase() + opName.substring(1); |
| 620 |
String action = capNS+opName+"Request"; |
618 |
String action = capNS+opName+"Request"; |
| 621 |
newInput.getElement().setAttributeNS(WsdmConstants.WSA_URI, WsdmConstants.WSA_ACTION_NAME, action); |
619 |
newInput.getElement().setAttributeNS(WsdmConstants.WSA_URI, WsdmConstants.WSA_ACTION_NAME, action); |
| 622 |
newOperation.setEInput(newInput); |
620 |
} |
| 623 |
} |
621 |
|
| 624 |
|
622 |
if (importOutput != null) { |
| 625 |
if (importOutput != null) { |
623 |
Output newOutput = WSDLFactory.eINSTANCE.createOutput(); |
| 626 |
OutputImpl newOutput = (OutputImpl) WSDLFactory.eINSTANCE.createOutput(); |
624 |
newOutput.setEnclosingDefinition(_wsdlCapDefinition); |
| 627 |
newOutput.setEnclosingDefinition(_wsdlCapDefinition); |
625 |
if(importOutput.getName()!=null) |
| 628 |
Element element = newOutput.createElement(); |
626 |
newOutput.setName(importOutput.getName()); |
| 629 |
if(importOutput.getName()!=null) |
627 |
newOutput.setEMessage(importOutput.getEMessage()); |
| 630 |
newOutput.setName(importOutput.getName()); |
628 |
newOperation.setEOutput(newOutput); |
| 631 |
newOutput.setEMessage(importOutput.getEMessage()); |
629 |
WsdlUtils.createOrFindPrefix(_wsdlCapDefinition, WsdmConstants.WSA_URI, WsdmConstants.WSA_PREFIX); |
| 632 |
WsdlUtils.createOrFindPrefix(_wsdlCapDefinition, WsdmConstants.WSA_URI, WsdmConstants.WSA_PREFIX); |
|
|
| 633 |
String opName = importOp.getName(); |
630 |
String opName = importOp.getName(); |
| 634 |
opName = opName.substring(0, 1).toUpperCase() + opName.substring(1); |
631 |
opName = opName.substring(0, 1).toUpperCase() + opName.substring(1); |
| 635 |
String action = capNS+opName+"Response"; |
632 |
String action = capNS+opName+"Response"; |
| 636 |
newOutput.getElement().setAttributeNS(WsdmConstants.WSA_URI, WsdmConstants.WSA_ACTION_NAME, action); |
633 |
newOutput.getElement().setAttributeNS(WsdmConstants.WSA_URI, WsdmConstants.WSA_ACTION_NAME, action); |
| 637 |
newOperation.setEOutput(newOutput); |
|
|
| 638 |
} |
634 |
} |
| 639 |
|
635 |
|
| 640 |
for (int i = 0; i < importFaults.size(); i++) { |
636 |
for (int i = 0; i < importFaults.size(); i++) { |