In W2O2 Micro Integrator, how do you preserve the following payload? In earlier versions of WSO2, the solution in the following stack overflow discussion worked. This no longer works in Micro Integrator 4.0.0.
Please refer to the stack overflow discussion: "WSO2 AM 1.9 - Keep CDATA in payload factory".
<soapenv:Body>
<![CDATA[
<?xml version="1.0" encoding="UTF-16"?>
<Test>
<abc>def</abc>
</Test>
]]></soapenv:Body>
WSO2 AM 1.9 - Keep CDATA in payload factory
The steps in the "Keep CData in payload factory" discussion worked after upgrading to Micro Integrator 4.1.0.
Related
Can any one please suggest how can I find wsdl version my web service is exposing -
snippet from wsdl -
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://tempuri.org/"
xmlns:wsa10="http://www.w3.org/2005/08/addressing"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
name="XXXService" targetNamespace="http://tempuri.org/">
I have gone through these web links -
https://coderanch.com/t/502335/certification/determine-wsdl-version
according to above post it's 1.2
whereas looking at this -
https://www.soapui.org/docs/soap-and-wsdl/working-with-wsdls/
SoapUI documentation says "SoapUI supports 1.1 version of the WSDL specification".
Because my wsdl loads successfully in SoapUI - could it be version 1.1?
So, I am not sure which version of wsdl (1.1/1.2/2.0) my web service is exposing.
Any suggestions please.
There are two WSDL versions: 1.1 and 2.0. A history of how these versions got to be can be found on the Wikipedia page for WSDL.
Also on that page it's a useful image of the differences between them and how to recognize the version you are dealing with:
The easiest way is to look at the root element in the XML:
if it's called <definitions> then it's a WSDL 1.1;
if it's called <description> then it's a WSDL 2.0;
Most of the WSDLs you will find out there will be version 1.1, but if the technology is newer, it might also be possible to retrieve a WSDL 2.0. See for example the answer on this post for more details about some conventions of retrieving a SOAP web service's WSDL if it provides one.
Is there any way to get human task details in Business Process Server 3.2.0 through webservice? I tried to call operation getTaskDetails in HumanTaskClientAPIAdmin, but server response is:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>This operation is not currently supported in this version of WSO2 BPS.</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Is this operation implemented and available? Or is there any other way to get task details?
Currently getTaskDetails() is not supported, and will be available with BPS 3.5.0. But same functionality is provided by loadTask() operation. loadTask provides additional taskdetails which is not provided by getTaskDetails().
WSO2 WS-Discovery Integration
We're trying to integrate WS-Discovery with the Carbon products WSO2 Governance Registry and WSO2 ESB having
Apache CXF Web Service stack configured via Spring running on a Tomcat sending hello messages to the
Discovery Proxy (localhost:9443/services/DiscoveryProxy) on WSO2 Greg.
Therefore we added cxf-services-ws-discovery-service.jar and cxf-services-ws-discovery-api.jar to the
classpath in Tomcat. Further we set the spring bus property org.apache.cxf.service.ws-discovery.address
to the URL address of the WS-Discovery Proxy on WSO2 Greg to run WS-Discovery in managed mode. By running
Tomcat and WSO2 Greg following error messages is logged in wso2Carbon.log (WSO2 Greg) ...
TID: [0] [Greg] [2013-07-15 11:45:03,411] INFO {org.wso2.carbon.discovery.proxy.DiscoveryProxy} - Service Discovery Failed. Retrying after 10s. {org.wso2.carbon.discovery.proxy.DiscoveryProxy}
TID: [0] [Greg] [2013-07-15 11:45:03,458] ERROR {org.wso2.carbon.governance.api.common.GovernanceArtifactManager} - Failed to add artifact: artifact id: urn:uuid:003aa9d9-2c9f-4e0b-8415-c99632226ee3, path: /trunk/services/org/oasis_open/docs/ws_dd/ns/discovery/_2009/_01/DiscoveredService_1373881503442. An exception occurred while executing handler chain. String index out of range: -1 {org.wso2.carbon.governance.api.common.GovernanceArtifactManager}
org.wso2.carbon.registry.core.exceptions.RegistryException: An exception occurred while executing handler chain. String index out of range: -1
at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.put(HandlerManager.java:2525)
at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.put(HandlerLifecycleManager.java:1005)
at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.put(EmbeddedRegistry.java:697)
at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.put(CacheBackedRegistry.java:465)
at org.wso2.carbon.registry.core.session.UserRegistry.put(UserRegistry.java:658)
at org.wso2.carbon.governance.api.common.GovernanceArtifactManager.addGovernanceArtifact(GovernanceArtifactManager.java:155)
at org.wso2.carbon.governance.api.services.ServiceManager.addService(ServiceManager.java:116)
at org.wso2.carbon.discovery.util.DiscoveryServiceUtils.addService(DiscoveryServiceUtils.java:152)
at org.wso2.carbon.discovery.proxy.DiscoveryProxy$1.run(DiscoveryProxy.java:89)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1911)
at org.wso2.carbon.registry.extensions.handlers.utils.EndpointUtils.deriveEndpointFromUrl(EndpointUtils.java:674)
at org.wso2.carbon.registry.extensions.handlers.utils.EndpointUtils.saveEndpoint(EndpointUtils.java:483)
at org.wso2.carbon.registry.extensions.handlers.utils.EndpointUtils.saveEndpointsFromServices(EndpointUtils.java:280)
at org.wso2.carbon.registry.extensions.handlers.ServiceMediaTypeHandler.put(ServiceMediaTypeHandler.java:353)
at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.put(HandlerManager.java:2503)
... 14 more
We tried to solve this issue for several hours by reading WSO2 product documentation and searching through
several forums, blogs etc. . Unfortunely we couldn't find a solution.
Remark: WS-Discovery integration with WSO2 Application Server instead of Tomcat just worked fine.
But when using WSO2 ESB as an discovery client to discover services from WSO2 Greg the wizard to create proxy services out of the
discoverd services on WSO2 ESB is missing the publishWSDL xml tag after creating the proxy. This tag must be added
manually. Is there a way to get this done without editing this additionally??
We would be grateful for any help.
Thanks in advance
Thank you for your quick reply
We intercepted the hello requests sent to WSO2 GReg via Tomcat and the WSO2 Application server. For this purpose we used soapUI mock
services. The message requests of the soap envelopes look as follows ...
Tomcat:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:tns="http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01">
<soap:Header>
<wsa:Action>http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/Hello</wsa:Action>
<wsa:MessageID>urn:uuid:e01ce7dc-53c0-4b36-b7d5-0e84e3bd6a5d</wsa:MessageID>
<wsa:To>https://localhost:9443/services/DiscoveryProxy</wsa:To>
<wsa:ReplyTo>
<wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
</wsa:ReplyTo>
</soap:Header>
<soap:Body>
<ns2:Hello xmlns="http://www.w3.org/2005/08/addressing" xmlns:ns2="http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01">
<EndpointReference>
<Address>urn:uuid:be46c1fc-1646-4bcc-8715-1aed4040fdd5</Address>
<ReferenceParameters/>
</EndpointReference>
<ns2:Types xmlns:ns3="http://user.service.scheck.server.tia/">ns3:IZ3UserService</ns2:Types>
<ns2:Scopes/>
<ns2:XAddrs>/userService</ns2:XAddrs>
<ns2:MetadataVersion>1</ns2:MetadataVersion>
</ns2:Hello>
</soap:Body>
</soap:Envelope>
WSO2 Application Server:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<mns:serviceName xmlns:mns="http://www.wso2.org/ws/discovery">echo</mns:serviceName>
<mns:wsdlURI xmlns:mns="http://www.wso2.org/ws/discovery">http://10.200.2.114:9764/services/echo?wsdl</mns:wsdlURI>
<wsa:To>https://localhost:9443/services/DiscoveryProxy</wsa:To>
<wsa:ReplyTo>
<wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID>urn:uuid:d21e108b-34a2-4313-8b12-a22015567a51</wsa:MessageID>
<wsa:Action>http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/Hello</wsa:Action>
</soapenv:Header>
<soapenv:Body>
<wsd:Hello xmlns:wsd="http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01">
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>urn:uuid:439a1cd5-fb36-40e2-a54e-e0cb7f3409e4</wsa:Address>
</wsa:EndpointReference>
<wsd:Types xmlns:axis2ns1="http://echo.services.core.carbon.wso2.org">axis2ns1:echoPortType</wsd:Types>
<wsd:Scopes>http://docs.oasis-open.org/ws-dd/ns/discovery/2009/01/DefaultScope</wsd:Scopes>
<wsd:XAddrs>https://10.200.2.114:9444/services/echo http://10.200.2.114:9764/services/echo</wsd:XAddrs>
<wsd:MetadataVersion>1</wsd:MetadataVersion>
</wsd:Hello>
</soapenv:Body>
</soapenv:Envelope>
Comparing both message requests we noticed that there are some tags missing like serviceName, wsdlURI and most important
in our opinion the XAddrs. By adding the XAddrs manually to an soapUI request we were able to register the cxf service
on WSO2 GReg. Maybe you can give us an advice how this could be achieved by configuring cxf via spring or by annotating our
web service implementations.
Thanks again..this helped us very much!!
For the integration purpose, we need to consume a web service exposed by TIBCO in HP SM.
In HP SM, we consume a web service by using a utility called wsdl2js, which create JavaScript using wsdl url. I am able to use wsdl2js but when I invoke the web service, I am able to see request xml getting formed in SM but in response I am getting an error message"
Error calling method: doSoapRequest in class:com/hp/ov/sm/server/utility/SoapClient
Exception(com.sun.xml.messaging.saaj.SOAPExceptionImpl:
java.security.PirvilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl:
Invalid Content-type:text/html.Is this an error message instead of a SOAP response?
In the wsdl file, there are following schemas:
<?xml version="1.0" encoding="UTF-8"?>
<!--Created by TIBCO WSDL-->
<wsdl:definitions xmlns:ns1="http://www.tibco.com/schemas/TIGIaaS-IP085/WSDL and XSD/Schema.xsd4" xmlns:tns="http://xmlns.example.com/1372306950675/CreateUpdateIncidentImpl/BusinessProcesses/_00-InputChannels" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns0="http://www.tibco.com/schemas/TIGIaaS-IP085v0.2/WSDL and XSD/Schema.xsd2" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/" name="Untitled" targetNamespace="http://xmlns.example.com/1372306950675/CreateUpdateIncidentImpl/BusinessProcesses/_00-InputChannels">
<wsdl:types>
<xs:schema xmlns="http://www.tibco.com/schemas/TIGIaaS-IP085v0.2/WSDL and XSD/Schema.xsd2" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.tibco.com/schemas/TIGIaaS-IP085v0.2/WSDL and XSD/Schema.xsd2" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="HPSM">
Could this error is because SM which is installed on a different unix server than TIBCO is not able to read schemas?
I have resolved this issue.
Issue was with SOAP Version. SOAP Version of wsdl provided by TIBCO was 1.2 and HP SM was expecting 1.1
SOAP 1.2 supports application/soap+xml, while SOAP 1.1 supports text/xml. That is why I was getting content-type error.
I am trying to use the built in web service in Sitecore 6.5 (.../sitecore/shell/webservice/service.asmx)
There is PDF that describes the commands, but it does not specify the format for inserting/updating items. It claims one can simply use the format when doing a GetXml request, but I have found that not to be true from my testing.
I have tried a number of variations, both trying with an or just single fields as suggested by this blog, with no luck and unfortunately the webservice does not complain about the input, it always responds "OK" with no effect.
The full request (as what I am looking at now)
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<Save xmlns="http://sitecore.net/visual/">
<xml>
<sitecore>
<field itemid="{7CCE4419-E8BD-45F4-9B9C-625E220C59A1}"
fieldid="{3F4B20E9-36E6-4D45-A423-C86567373F82}"
language="en"
version="1">
<content>A title from service</content>
</field>
</sitecore>
</xml>
<databaseName>master</databaseName>
<credentials><!-- removed --></credentials>
</Save>
</soapenv:Body>
If anyone knows what the format is that would be great.
If you are using Sitecore 6.5 then you can use the Item Web API, this should give you access to everything you need via JSON REST services.
There was a great response from Kevin Obee with further links, but also have a read of the following:
Sitecore Item Web API and Json.Net Test Drive
New features in Sitecore 6.6 – Webinar
I normally write my own webservice if I want to do some modifications to Sitecore items and found it a much more flexible way because I mostly want at least just a bit more functionality then the standard webservice has to offer. But be aware that you cannot serialize the Sitecore.Data.Items.Item class so sending an Item object through Soap is not going to work.