I am trying to configure wsdl proxy in WSO2 ESB. It is not allowing the following WSDL URL.
https://secure-ausomxapa.crmondemand.com/OnDemand/user/Opportunity.wsdl?WSDLOBJ=Opportunity&WSDLTYPE=CUSTOM&XSDOnly=N&ECBS=Y
I am checking " Publish Same Service Contract" check box while creating. But its throwing ERROR - RPCMessageReceiver com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected chara
cter '=' (code 61); expected a semi-colon after the reference for entity 'WSDLTYPE'
But the above url is correct and it opens correctly by giving user name and password.
I have encoded the above WSDL URL, but its not allowing me to even. Please suggest me what should be the problem with this URL.
Thanks&Regards,
Raghu
Download the particular wsdl to your local file system and provide the wsdl path for the "wsdl uri" option like;
file:E:/releases/wso2esb-4.0.3/repository/samples/resources/proxy/sample_proxy_1.wsdl
Related
i've just installed the WSo2 service bus to make my own Service Oriented Architecture (SOA).
I'm trying to connect a Ignition (MES/SCADA) system, to a webservice on another (embedded)computer.
I've made the service in the management console, when i use the tryit function, i can fill in the form, but when i send the message i get the following error:
"The endpoint reference (EPR) for the Operation not found is /services/CalculatorWS.CalculatorWSHttpSoap12Endpoint and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator."
When i try to do the same within my Ignition program, i get the following error: unknown url type:"calculatorws"?xsd=http.
I think this has to do with the SOAP message, because i compared the one from my webservice, with the one WSO2 generated.
WSO2 missgenerates the following line within the WSDL:
schemaLocation="CalculatorWS?xsd=http://169.254.166.123:8080/CalculatorApp/CalculatorWSService?xsd=1"
i think this should be:
schemaLocation="http://169.254.166.123:8080/CalculatorApp/CalculatorWSService?xsd=1"
is this the right conclusion? if yes, how can i adjust it?
besides this, when i use the SOAP Messagetracer from WSO2, i do get the answer i want back! how is this possible?
I'd like to hear from you,
Thanks in advance,
T Dantuma
According to your configuration, it looks like you are going to implement WSDL-based proxy. Then you no need to give published WSDL URL. Try to remove above line from proxy as you mentioned:
<xsd:import namespace="http://calculator.me.org/" schemaLocation="CalculatorWS?xsd=http://169.254.166.123:8080/CalculatorApp/CalculatorWSService?xsd=1"/>
ESB will be adding xsd with relevant namespace
when you define external namespace for given property
you adding external namespace for service within your service and ESB cannot identify your component. Then it will be use given namespace to solve confusions.
Try above methods. If you cannot identify exact error, please add whole configuration in your question (Edit and put the configuration).
If you still get the error:
Please log in to WSDL and check whether it can be accessible
http://169.254.166.123:8080/CalculatorApp/CalculatorWSService?wsdl
Check your invocation method. Becuase "POST" or "GET" request may need special invocations. (Ex: any parameters required for invocation or correct URL may different with exact method)
[1] https://docs.wso2.com/display/ESB490/WSDL+Based+Proxy+Template
I have a web service deployed on Jetty. I use the SOAP UI to call it via link like http://ip:port/DefaultRequestListener?workflow=WsdlCPF&soapAction=Import and it works.
I have always worked with service which had ?wsdl at the end of url, but now I confused.
Why there is no ?wsdl at the end of url?
A Web Service endpoint usually has an url that looks like this:
http://server:port/services/myservice
It does not have a wsdl parameter. This is the url of the web service itself, the one that will be called by the clients.
Most web service frameworks have a convenient feature in which they map the url of the endpoint with a wsdl url parameter to a webpage that shows the content of the WSDL for that web service. So this url:
http://server:port/services/myservice?wsdl
Is like telling the server: "Show me the wsdl file for this web service endpoint". The content that you see in that webpage is not a wsdl file stored in disk, it is just the content of the wsdl generated by the framework.
This feature is very useful because if we want to create a client for that web service we don't need to go ask for the wsdl file, we can just go and fetch it from that url.
In SoapUI
All this means that in SoapUI you would create a new project and tell him that the wsdl file can be found here: http://server:port/services/myservice?wsdl. If you tell him that the wsdl file is: http://server:port/services/myservice it will throw an error as that is not a wsdl file.
Alternatively you could enter the location of the wsdl file that you have in disk instead of the url and it should create the same ws client.
Then SoapUI will read the wsdl and he will see that the endpoint for the web service is http://server:port/services/myserviceso this is where he will send the requests.
Your web service
In your case, since you are already passing url parameters to the endpoint, you can consider that your webservice will be called at this url:
http://ip:port/DefaultRequestListener?workflow=WsdlCPF&soapAction=Import
And if you want to see the wsdl for that web service, you just add a wsdl parameter to the url. Note that just as any other url query the symbol ? just denotes that the url ends there and next characters are url parameters which are separated by &. In your case you have 3 parameters (workflow, soapAction and now wsdl):
http://ip:port/DefaultRequestListener?workflow=WsdlCPF&soapAction=Import&wsdl
now it returns a text like Company type: blah blah... Region: blah blah...
This is the wsdl content, which of course includes the xml types used in the web service, all normal.
Maybe it looks strange to you because in the wsdl file you have in disk it does not show all these types and instead it imports the xsd files that contain those definitions. The wsdl you see in your browser will never have imports like that, and will always show all the types embedded in the wsdl file.
Scroll down past all those types definitions and you will see the rest of the wsdl.
I hope it helped to make clear that the url with ?wsdl at the end is not the web service and it's just the wsdl content.
I am using a wsdl file sent to me via email to generate a WS client application but I wonder if it is better to have the WSDL hosted on a server and to use an URL to request it.
Actually, I requested the URL but apparently this WSDL don't have one and I can ask to create an Url for the wsdl if it is really necessary.
Can you tell me please what are the benefits of using the WSDL Url to create a WS client ?
There is not difference for you how to generate WS client. In both cases this is just WSDL document, no matter where it located is.
I see only one benefit direct accessible WSDL against WSDL file - WSDL will be always actual and and all web service changes will be reflected to WSDL document.
If you using axis 2, you can try call your webservice with ?wsdl suffix to get WSDL document
if this your webservice url
http://localhost:8080/axis2/services/StockQuoteService
This is wsdl location
http://localhost:8080/axis2/services/StockQuoteService?wsdl
I have down loaded WSO2 ESB Version 4.6 and started the server. Clicked on proxy service. There I have selected WSDL Proxy option. It is asking the following for creating proxy.
Proxy Service Name* OpportunityService
WSDL URI* https://crm-aufsn4x0ruf.oracleoutsourcing.com//opptyMgmtOpportunities/OpportunityService?WSDL
WSDL Service* https://crm-aufsn4x0ruf.oracleoutsourcing.com:443/opptyMgmtOpportunities/OpportunityService
WSDL Port* 443
I just want consume this external web service via ESB. So I dont want publish. Did not configure any publish related fields. Now When I click on create it throws exception "Failed to add proxy service: OpportunityService. Check whether the Proxy already exists
". But I am sure that there is no existed service with that. I have tried with different names but the error is same.
I suspect that may gave values wrong for fields WSDL Service and WSDL Port. If click on Test URI its giving success.Can any one please suggest where I am doing wrong.
Thanks&Regards,
Raghu
For wsdl service parameter you need to give the <wsdl:service name>which you can find in the particular wsdl itself. I dont think it will be a URI like you have mentioned above. Likewise for port you can find the <wsdl:port> parameter in the wsdl.
I have a .WSDL file from our client company, for which I need to use to call a web service. Their system is SAP (SAP PI). My application is a C# .NET 3.5 client developed in VS 2008. I added a Service Reference in Visual Studio using their provided .WSDL file. This created a reference class for me to use to call their service, and set up several bindings in the app.config file for me.
I did not change anything in the app.config file, but did create code to call their web service. However, when I call their webservice, I receive the following exception:
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic realm="SAP NetWeaver Application Server ..."'.
(I modified slightly the string used in the 'Basic realm' section so as to not give it out.)
Did the app.config not get built correctly from the WSDL? Am I supposed to modify the app.config file somehow?
Things I've tried:
changed authenticationScheme in app.config from Anonymous to Basic
(as well as all the other authentication types)
changed realm string in app.config to match the realm in the exception message
set username/pw fields in the ClientCredentials.Username object in my code
Any pointers or help would be appreciated.
Edit: After some more investigation, I found that Visual Studio has several warnings about the extension element Policy and Policy assertions:
Custom tool warning: The optional WSDL extension element 'Policy'
from namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' was not
handled.
Custom tool warning: The following Policy Assertions were not Imported:
XPath://wsdl:definitions[#targetNamespace='urn:sap-com:document:sap:rfc:functions']/wsdl:binding[#name='Binding_FieldValidation']
Assertions: ...
I wasnt able to find out if this was related or not to my current issue with the authentication scheme. It does seem to be related, but I havent been able to find any solutions to getting these policy warnings resolved either. It seems WCF doesnt handle the statements in the wsdl very well.
Most SAP services dont support anonymous.
So pass some form of authentication data with the call.
User and password / X.509 Ticket...
If you are sending auth data with the call the try this
Ask the SAP guy to regenerate the WSDL with
No SAP assertions, No policy, SOAP 1.1.
You can also try and edit the WSDL by hand to remove the extra guff...
As a starting point, I'd verify that you can call the service successfully with the provided username and password. Use something like SoapUI to test that everything works correctly - just create a new project, import the WSDL provided by SAP PI, set the username and password and execute the call. You'll probably get some form of exception with an empty payload, but at least that'll verify that the username and password are correct.
Once you've verified that's working, check that your application is calling the service correctly and that the http basic authentication headers are being sent. You can confirm this by using a network monitoring tool and checking that the http request is being generated correctly. Something like netcat for Windows can do it - just make it listen to a port on your local machine and then specify localhost and the port as your SOAP endpoint.
Once you've verified both of those are correct, your call should succeed.
There must be the Basic authentication header missing or something wrong
with the credentials.
SAP PI always defaults to Basic Authentication if a Service is published via it's SOAP Adapter. I would investigate if WCF really does send out that header (e.g. Point your client endpoint to TCP Gateway and let TCP Gateway point to the SAP PI Endpoint from the WSDL).
About the Warnings: AFAIK the WSDL generated by SAP PI will always contain these Policy Tags, you can't really ommit it. What you can do is simply throw them out as they are not really validated