|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
Variable Hostname in a WSDL?Hello -
I need to access a large set of web services, offered by a remote server, from my BPELs running locally. I have the WSDLs and XSDs, but the exact hostname/IP of the target needs to configurable. Is there a variable I can use/create that works like ${HttpDefaultPort} for the specific WSDLs? Or is there another preferred way to do this? Trying remote web services into a local BPEL would seem to be something that would frequently come up. Thanks |
|
|
Re: Variable Hostname in a WSDL?You could use dynamic partner link feature
http://wiki.open-esb.java.net/Wiki.jsp?page=UsingDynamicPartnerLinks change the address of the service you are invoking. Business process (BP) can read the address URLs from database or another store using one of the binding components or hard code it in BP. Regards Murali jsexton0 wrote: > Hello - > I need to access a large set of web services, offered by a remote server, > from my BPELs running locally. I have the WSDLs and XSDs, but the exact > hostname/IP of the target needs to configurable. > > Is there a variable I can use/create that works like ${HttpDefaultPort} for > the specific WSDLs? > > Or is there another preferred way to do this? Trying remote web services > into a local BPEL would seem to be something that would frequently come up. > > Thanks > |
|
|
Re: Variable Hostname in a WSDL?Yes, I'm considering that. I used it for another part of the application. But there are a large number of services I need all with different WSDLs. It would be quite a lot of work to setup variable PLs for each one of them. All I need to alter is the hostname, and it's a setup-at-install thing, not a run-time thing.
I was also thinking I might create an EJB that just calls a web service after reading the hostname from my applications configuration. That seems like a strange thing to do though; adding an EJB layer when I'm already working with JBI/ESB technology. Any other choices available?
|
|
|
Re: Variable Hostname in a WSDL?I think you can achieve this by means of BPEL.
You can get the list of services and to process them by using "ForEach" and/or "RepeatUntil" constructs. To address your problem more detailed information is needed. Thanks, Sergey jsexton0 wrote: > Yes, I'm considering that. I used it for another part of the application. > But there are a large number of services I need all with different WSDLs. > It would be quite a lot of work to setup variable PLs for each one of them. > All I need to alter is the hostname, and it's a setup-at-install thing, not > a run-time thing. > > I was also thinking I might create an EJB that just calls a web service > after reading the hostname from my applications configuration. That seems > like a strange thing to do though; adding an EJB layer when I'm already > working with JBI/ESB technology. > > Any other choices available? > > > Murali Pottlapelli wrote: > >> You could use dynamic partner link feature >> http://wiki.open-esb.java.net/Wiki.jsp?page=UsingDynamicPartnerLinks >> change the address of the service you are invoking. >> >> Business process (BP) can read the address URLs from database or >> another store using one of the binding components or hard code it in BP. >> >> Regards >> Murali >> >> jsexton0 wrote: >> >>> Hello - >>> I need to access a large set of web services, offered by a remote server, >>> from my BPELs running locally. I have the WSDLs and XSDs, but the exact >>> hostname/IP of the target needs to configurable. >>> >>> Is there a variable I can use/create that works like ${HttpDefaultPort} >>> for >>> the specific WSDLs? >>> >>> Or is there another preferred way to do this? Trying remote web services >>> into a local BPEL would seem to be something that would frequently come >>> up. >>> >>> Thanks >>> >>> >> > > |
|
|
Re: Variable Hostname in a WSDL?
You can change the host name/ip address in the address by xpath query.
or invoke Java code enabled as WS before invoking actual service. In the Java code manipulate the EPR. You could use looping constructs invoke more services. Regards Murali jsexton0 wrote: Yes, I'm considering that. I used it for another part of the application. But there are a large number of services I need all with different WSDLs. It would be quite a lot of work to setup variable PLs for each one of them. All I need to alter is the hostname, and it's a setup-at-install thing, not a run-time thing. I was also thinking I might create an EJB that just calls a web service after reading the hostname from my applications configuration. That seems like a strange thing to do though; adding an EJB layer when I'm already working with JBI/ESB technology. Any other choices available? Murali Pottlapelli wrote:You could use dynamic partner link feature http://wiki.open-esb.java.net/Wiki.jsp?page=UsingDynamicPartnerLinks change the address of the service you are invoking. Business process (BP) can read the address URLs from database or another store using one of the binding components or hard code it in BP. Regards Murali jsexton0 wrote: |
|
|
Re: Variable Hostname in a WSDL?There turned out to be other reasons, with regard to my requirements, that I have to do this switching in an EJB, in java. So I've gone in that direction. However, I'm having a lot of trouble getting a WS call to target a server other than localhost. I posted something about that problem here:
http://www.nabble.com/Unable-to-Call-a-Remote-WS-to19636854.html I am pretty sure I am doing that call correctly, but it will only work against services deployed on the local server. But I have to have remote calls. If that approach just can't work, I guess I'll be back to concidering doing something in the BPEL to alter the address, if I can get past the other requirements. I did use an xpath based solution for changing the PL in another of my project's funtions and that worked out fine. Thank you
|
|
|
Re: Variable Hostname in a WSDL?I've managed to make a lot of progress on this project using a combination of Java and dynamic partner links setup using a XSLT. I have the Java calling a local WS, which is redirected in BPEL.
I have one more WS to reach however and it's a little different. I have been given a WSDl created with MSFT .Net tools and I've been unable to determine what it's server and port should be, for generating the EPR variable. The WSDL looks like this: <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.iwsinc.com/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.iwsinc.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> ... <wsdl:operation name="GetNeededFields"> <soap12:operation soapAction="http://www.iwsinc.com/GetNeededFields" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="Service"> <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap"> <soap:address location="http://localhost:1686/WebService/Service.asmx" /> </wsdl:port> <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12"> <soap12:address location="http://localhost:1686/WebService/Service.asmx" /> </wsdl:port> </wsdl:service> </wsdl:definitions> I tried the address of "http://localhost:1686/WebService/Service.asmx" A service of "<service xmlns:serv="http://www.iwsinc.com/">serv:Service</service>" And a port of "ServiceSoap" and "ServiceSoap12" Because of the nature of the failure, I think the service and or port is wrong? I was hoping to get "connection refused" since I do not have this service available. This is what I got instead: <?xml version="1.0" encoding="UTF-8"?><ns1:EndpointReference xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:sref="http://docs.oasis-open.org/wsbpel/2.0/serviceref"><ns1:Address>http://localhost:1686/FarmWebService/Service.asmx</ns1:Address><ns1:ServiceName xmlns:serv="http://www.iwsinc.com/" PortName="ServiceSoap12">serv:Service </ns1:ServiceName></ns1:EndpointReference> BPJBI-6019:unable to resolve the service endpoint dynamically for the document fragment <?xml version="1.0" encoding="UTF-8"?><ns1:EndpointReference xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:sref="http://docs.oasis-open.org/wsbpel/2.0/serviceref"><ns1:Address>http://localhost:1686/FarmWebService/Service.asmx</ns1:Address><ns1:ServiceName xmlns:serv="http://www.iwsinc.com/" PortName="ServiceSoap12">serv:Service </ns1:ServiceName></ns1:EndpointReference> BPJBI-6001:Sending ERROR status (Service Name = {http://enterprise.netbeans.org/bpel/CMS_Custom_BPEL/CMSPFProxy}CMSPFCheckIfDGNIsInSystemSoapPL, Endpoint Name = CMSPFCheckIfDGNIsInSystemSoapPortTypeRole_myRole, Operation Name = {http://j2ee.netbeans.org/wsdl/CMSPFCheckIfDGNIsInSystemSoap}CMSPFCheckIfDGNIsInSystemSoapOperation, Message Exchange Id = 98051637587543-32054-134423697791560141) Error properties com.sun.jbi.crl.faultcode = Server com.sun.jbi.crl.faultstring = BPCOR-6135:A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is <?xml version="1.0" encoding="UTF-8"?><jbi:message xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling" type="sxeh:faultMessage" version="1.0" xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part>BPJBI-6019:unable to resolve the service endpoint dynamically for the document fragment <?xml version="1.0" encoding="UTF-8"?><ns1:EndpointReference xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:sref="http://docs.oasis-open.org/wsbpel/2.0/serviceref"><ns1:Address>http://localhost:1686/FarmWebService/Service.asmx</ns1:Address><ns1:ServiceName xmlns:serv="http://www.iwsinc.com/" PortName="ServiceSoap12">serv:Service </ns1:ServiceName></ns1:EndpointReference></jbi:part></jbi:message>. Sending errors for the pending requests in the process scope before terminating the process instance com.sun.jbi.crl.faultactor = sun-bpel-engine com.sun.jbi.crl.faultdetail = BPCOR-6135:A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is <?xml version="1.0" encoding="UTF-8"?><jbi:message xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling" type="sxeh:faultMessage" version="1.0" xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part>BPJBI-6019:unable to resolve the service endpoint dynamically for the document fragment <?xml version="1.0" encoding="UTF-8"?><ns1:EndpointReference xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:sref="http://docs.oasis-open.org/wsbpel/2.0/serviceref"><ns1:Address>http://localhost:1686/FarmWebService/Service.asmx</ns1:Address><ns1:ServiceName xmlns:serv="http://www.iwsinc.com/" PortName="ServiceSoap12">serv:Service </ns1:ServiceName></ns1:EndpointReference></jbi:part></jbi:message>. Sending errors for the pending requests in the process scope before terminating the process instance Caused by: BPCOR-7131:A fatal exception has occurred BPCOR-6129:Line Number is 72 BPCOR-6130:Activity Name is Invoke1 Caused by: BPJBI-6019:unable to resolve the service endpoint dynamically for the document fragment I could sure use some advise on this. This is the last functionality I need to get access to remotely in this project. It just figures it would be a Microsoft service... Thank you |
|
|
Re: Variable Hostname in a WSDL?Any ideas about this? I've been able to do this with several other WSDLs, but not this one. I'm displaying the EPR value I'm trying to use. It seems like it should work:
<?xml version="1.0" encoding="UTF-8"?><ns1:EndpointReference xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:sref="http://docs.oasis-open.org/wsbpel/2.0/serviceref"><ns1:Address>http://192.168.15.39:1686/EPIPrintFarmWebService/Service.asmx</ns1:Address><ns1:ServiceName xmlns:serv="http://www.iwsinc.com/" PortName="ServiceSoap">serv:Service </ns1:ServiceName></ns1:EndpointReference> BPJBI-6019:unable to resolve the service endpoint dynamically for the document fragment In addition, this WSDL contains several operations. I haven't gotten to that problem yet... Maybe there just is no way to do this with a .Net generated WS, from BPEL. At this point, I guess I will start writing Java dispatch type code in an EJB. I'll post that solution elsewhere. I'm sure others will need to do this with Netbeans. I would think it would be common.
|
| Free embeddable forum powered by Nabble | Forum Help |