private void initWsdlArtefact(String wsdlFileName) throws SchemaException, WSDLImportException{ //Add import Import import1 = this.wsdlArtefacts.createImport(); import1.setLocationURI(URI.create(wsdlFileName)); import1.setNamespaceURI(this.wsdlBpel.getTargetNamespace()); import1.setDescription(this.wsdlBpel); this.wsdlArtefacts.addImport(import1); this.wsdlArtefacts.setTargetNamespace(this.wsdlBpel.getTargetNamespace()+"Artifacts"); Iterator<InterfaceType> itInterfaces = this.wsdlBpel.getInterfaces().iterator(); while(itInterfaces.hasNext()){ InterfaceType current = itInterfaces.next(); // Create PartnerLinkType for Bpel Interface (will be MyRole) PartnerLinkType plt = new PartnerLinkTypeImpl(new TPartnerLinkType(), this.wsdlArtefacts); QName pltQName = new QName(this.wsdlArtefacts.getTargetNamespace(), current.getQName().getLocalPart()+"PLT"); plt.setQName(pltQName); Role role = new RoleImpl(new TRole(),plt); role.setName(current.getQName().getLocalPart()+"Role"); role.setInterface(current); plt.addRole(role); this.wsdlArtefacts.addPartnerLinkType(plt); } }
public Import addArtefactImport(URI location, Description wsdlDesc){ Import import1 = null; try { import1 = this.wsdlArtefacts.createImport(); import1.setLocationURI(location); import1.setNamespaceURI(wsdlDesc.getTargetNamespace()); import1.setDescription(wsdlDesc); this.wsdlArtefacts.addImport(import1); } catch (WSDLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (WSDLImportException e) { // TODO Auto-generated catch block e.printStackTrace(); } return import1; }
private void initWsdlArtefact(String wsdlFileName, Description wsdlOfBpel, org.ow2.easywsdl.extensions.wsdl4bpel.api.Description wsdlArtifacts, QName interfaceQName) throws SchemaException, WSDLImportException{ //Add import Import import1 = wsdlArtifacts.createImport(); import1.setLocationURI(URI.create(wsdlFileName)); import1.setNamespaceURI(wsdlOfBpel.getTargetNamespace()); import1.setDescription(wsdlOfBpel); wsdlArtifacts.addImport(import1); wsdlArtifacts.setTargetNamespace(wsdlOfBpel.getTargetNamespace()+"Artifacts"); InterfaceType current = wsdlOfBpel.getInterface(interfaceQName); PartnerLinkType plt = new PartnerLinkTypeImpl(new TPartnerLinkType(), wsdlArtifacts); QName pltQName = new QName(wsdlArtifacts.getTargetNamespace(), current.getQName().getLocalPart()+"PLT"); plt.setQName(pltQName); Role role = new RoleImpl(new TRole(),plt); role.setName(current.getQName().getLocalPart()+"Role"); role.setInterface(current); plt.addRole(role); wsdlArtifacts.addPartnerLinkType(plt); }
impt.setLocationURI(new URI("wsdm.wsdl")); impt.setNamespaceURI(wsdm.getTargetNamespace()); desc.addImport(impt);
impt.setLocationURI(new URI("http://docs.oasis-open.org/wsdm/mows-2.wsdl")); impt.setNamespaceURI("http://docs.oasis-open.org/wsdm/mows-2.wsdl"); desc.addImport(impt);