Index: bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/wsdl/WSDLFactoryBPEL20.java
===================================================================
--- bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/wsdl/WSDLFactoryBPEL20.java (revision 88)
+++ bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/wsdl/WSDLFactoryBPEL20.java (working copy)
@@ -33,29 +33,36 @@
*/
public class WSDLFactoryBPEL20 extends WSDLFactoryImpl implements WSDLFactory4BPEL {
- private BpelObjectFactory _bomf;
- private BpelExtensionSerializer _bs;
+ private BpelObjectFactory _bomf;
+ private BpelExtensionSerializer _bs;
- public WSDLFactoryBPEL20() {
- super(Bpel20QNames.NS_WSBPEL2_0_FINAL_EXEC, Bpel20QNames.NS_WSBPEL2_0_FINAL_PLINK
- , Bpel20QNames.NS_WSBPEL2_0_FINAL_VARPROP);
- _bomf = BpelObjectFactory.getInstance();
- _bs = new BpelExtensionSerializer(_bomf);
- }
+ public WSDLFactoryBPEL20() {
+ super(Bpel20QNames.NS_WSBPEL2_0_FINAL_EXEC, Bpel20QNames.NS_WSBPEL2_0_FINAL_PLINK
+ , Bpel20QNames.NS_WSBPEL2_0_FINAL_VARPROP);
+ _bomf = BpelObjectFactory.getInstance();
+ _bs = new BpelExtensionSerializer(_bomf);
+ }
- public static WSDLFactory newInstance() {
- return new WSDLFactoryBPEL20();
- }
+ public static WSDLFactory newInstance() {
+ return new WSDLFactoryBPEL20();
+ }
- public ExtensionRegistry newPopulatedExtensionRegistry() {
- ExtensionRegistry extRegistry;
- extRegistry = super.newPopulatedExtensionRegistry();
- extRegistry.registerDeserializer(Definition.class, new QName(_propNS, "property"),_bs);
- extRegistry.registerDeserializer(Definition.class, new QName(_propNS, "propertyAlias"), _bs);
- extRegistry.registerDeserializer(Types.class, XMLSchemaType.QNAME, new XMLSchemaTypeSerializer());
- extRegistry.registerDeserializer(Definition.class, new QName(_plnkNS, "partnerLinkType"),_bs);
- return extRegistry;
+ public ExtensionRegistry newPopulatedExtensionRegistry() {
+ ExtensionRegistry extRegistry;
+ extRegistry = super.newPopulatedExtensionRegistry();
+ extRegistry.registerDeserializer(Definition.class, new QName(_propNS, "property"),_bs);
+ extRegistry.registerDeserializer(Definition.class, new QName(_propNS, "propertyAlias"), _bs);
+ extRegistry.registerDeserializer(Types.class, XMLSchemaType.QNAME, new XMLSchemaTypeSerializer());
+ extRegistry.registerDeserializer(Definition.class, new QName(_plnkNS, "partnerLinkType"),_bs);
- }
+ // serializer
+ extRegistry.registerSerializer(Definition.class, new QName(_propNS, "property"),_bs);
+ extRegistry.registerSerializer(Definition.class, new QName(_propNS, "propertyAlias"), _bs);
+ extRegistry.registerSerializer(Types.class, XMLSchemaType.QNAME, new XMLSchemaTypeSerializer());
+ extRegistry.registerSerializer(Definition.class, new QName(_plnkNS, "partnerLinkType"),_bs);
+ return extRegistry;
+
+ }
+
}
Index: bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/wsdl/BpelExtensionSerializer.java
===================================================================
--- bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/wsdl/BpelExtensionSerializer.java (revision 88)
+++ bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/wsdl/BpelExtensionSerializer.java (working copy)
@@ -22,8 +22,7 @@
import java.net.URI;
import java.net.URISyntaxException;
-import org.apache.ode.bpel.compiler.bom.BpelObject4WSDL;
-import org.apache.ode.bpel.compiler.bom.BpelObjectFactory;
+import org.apache.ode.bpel.compiler.bom.*;
import org.apache.ode.utils.DOMUtils;
import org.apache.ode.utils.msg.MessageBundle;
import com.ibm.wsdl.util.xml.XPathUtils;
@@ -60,7 +59,75 @@
*/
public void marshall(Class arg0, QName arg1, ExtensibilityElement arg2, PrintWriter arg3, Definition arg4,
ExtensionRegistry arg5) throws WSDLException {
- throw new UnsupportedOperationException();
+ if("partnerLinkType".equals(arg1.getLocalPart()))
+ {
+ String namespaceURI = arg1.getNamespaceURI();
+ PartnerLinkType plink = (PartnerLinkType)arg2;
+
+ // xmlns:h="http://www.w3.org/TR/html4/"
+ StringBuffer sb = new StringBuffer();
+ sb.append("");
+
+ for(PartnerLinkType.Role role : plink.getRoles())
+ {
+ sb.append("");
+ }
+
+ sb.append("");
+
+ arg3.write(sb.toString());
+ }
+ else if("property".equals(arg1.getLocalPart()))
+ {
+ String namespaceURI = arg1.getNamespaceURI();
+ Property property = (Property)arg2;
+
+ StringBuffer sb = new StringBuffer();
+ sb.append("");
+
+ arg3.write(sb.toString());
+ }
+ else if("propertyAlias".equals(arg1.getLocalPart()))
+ {
+ String namespaceURI = arg1.getNamespaceURI();
+ PropertyAlias propertyAlias = (PropertyAlias)arg2;
+
+ StringBuffer sb = new StringBuffer();
+ sb.append("");
+ sb.append(propertyAlias.getQuery());
+ sb.append("");
+
+ sb.append("");
+
+ arg3.write(sb.toString());
+ }
+ else
+ {
+ throw new UnsupportedOperationException("Unknown element "+arg1);
+ }
}
/**