I am using cxf framework in order to expose some web services.
When i tested it using soap-ui, it works great. But one of our customers that uses different soap client complains that the message ends with:
/soap:Envelope>
--uuid:91c5694a-93f5-404c-ab2b-8c220b7f289f--
I searched the web, and i found that this line apears not only in our system. But I couldn't figure out whether this suffix is valid and well-formed, or not.
Is there any reference that document this issue?
Is it really valid?
How can I remove it?
Thanks!
It sounds like you have MTOM enabled on the server side. In that case, the SOAP message is wrapped in mime wrappers (which is per spec). The --uuid thing is a marker of a mime part. If the client is having issues with those, then it sounds like that client cannot handle MTOM. You COULD turn MTOM off for those clients.
Related
I am wondering if anybody knows if wiremock has support for WS-Policy in regards to SOAP webservices?
What I'm after is to give wiremock a WSDL that has some WS-Policy in it, that contains the "reciepe" for what the response should look like. Ie timestamp in the header, signed body, etc.
So, ideally I'd just specify the soap body and wiremock would apply the WS-Policy and add the necessary signatures.
I found this github issue that mentioned SOAP support, but the impression I got from that support was that it was just an arbitrary text response without having actual SOAP understanding/processing.
Would it be possible to plug-in Apache CXF to get proper JAX-WS/WS-Policy support if I were so inclined? Or would it be difficult to offload response processing to a third party library?
No such support I'm afraid. SOAP requires a lot of tooling to in test contexts.
I posted my solution to this problem in another similar question. The crux of it was some hand crafted SOAP manipulation and WireMocks CustomRequest matchers.
This is critical to my current project. I have written a client in C++ using Windows web services. This client talks to the Clickatell SMS SOAP web service. I have tested the request using the SOAPUI tool and get correct response. I also receive the SMS message. Now, when I do this programmatically it fails because the WsCall() [in the code generated from WSDL via wsutil.exe) inserts even though the SOAP request I have already includes Envelope and Body. I cannot take out my Envelope since I have namespace specified in it like this:
http://schemas.xmlsoap.org/soap/encoding/\" xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:tns=\"soap.clickatell.com\">
I know that the additional Envelope and Body are inserted since I see it in the Fiddler tool.
Any help I can get is highly appreciated!
Looks like you are using the older type rpc/encoded soap api.
Have you tried using the document/literal service?
(http://api.clickatell.com/soap/document_literal/webservice.php?wsdl)
I have seen some of the SOAP- Example- Mediators. I have not found a transformation based on the endpoint-WSDL.
I want to send some nested named array in json or POX and that data should go into a complete namespaced headered (username, password) SOAP-Request based on the names.
All the examples I have found had either a very simple wsdl or the namespaces were static in the XSL-Transformation.
It should be possible to do that, as I see in for example php-NuSOAP. You feed it with a wsdl-endpoint, the operation you want to execute and the parameter-array, and it calls the Webservice.
I am looking for a solution which is not too much hardcoded for every single service, so the proxy still works when the wsdl changes and Server Clients get changed.
As far as I understand the payload factory mediator in (https://stackoverflow.com/a/12969814/2277620) you would have to hardcode the soap-format in the mediator.
If WSO2 is the wrong tool for that I'd like to have a hint which tool could help.
Thanks in advance!
Marco.
For my understanding, you want to have a proxy, but it's backend service/wsdl may vary..
What , you can do is, you can save the wsdl (dynamic wsdl)in registry and point that in your proxy. whenever you edit the wsdl, proxy will automatically adopt to that..But the request, which you send to your backend should follow the wsdl definitions..It is totally client side responsibility..
I have a big problem in Axis2 client implementation.
I've generated the source code of my client (Java) through the Intellij Idea IDE from a wsdl file.
I use the client to connect in https with a webserver using a smartcard, in which is stored the certificate for the authentication.
Using the first smartcard, everything works fine: I receive data from the webservice in the right way. Using the second smartcard, I receive data related to first smartcard owner.
Analyzing the logs of my application, I've noticed that, at the end of the first communication, a session has been saved. So, in the second connection, the authentication is not needed and data is related to first smartcard owner.
Googling around, I've found that, to avoid to maintain sessions in Axis2 clients, it is needed to set the following:
currentStub._getServiceClient().getOptions().setManageSession(false);
But it does not work properly.
Anyone has suggestions?
I know, this question is quite old.
You could just create a new Stub. This should not have any reference to the old connections/sessions.
I am new to Spring web services. I am going to create an xml request, and send it as a SOAP request to a web service and receive the response.I read different documents but still confused as I could not find a working sample yet.
I know that I should use WebServiceTemplate and WebServiceMessageSender, SaajSoapmessageFactory (please let me know if I am wrong) but not sure how to use them.
Do I need WSDL? if yes why?
If you have any sample code please send me to get clear on it.
Thanks
If you want to send SOAP requests, you would like to be a SOAP client. Seems like you want to use spring-ws project. Check out their great documentation on the client side. The same documentation will guide you through the process of creating a server. There are plenty of examples and ready-made configuration snippets waiting for you.
Spring-WS is built on top of XML Schema description of your message, so you will need WSDL to generate e.g. JAXB models of your requests and responses.
AFAIK, for "web services" , the WSDL file is the machine blueprint of the "ports" as they are called However! ports in WSDL "means" java language(or any other programming language used with a routine or sub or procedure or function) method and has a specific naming scheme associate the .wsdl xml file(template of the service). Each WSDL port(language method) has specifications of return value and data specifications for how to feed it arguments and their type values.