Usually Web-services return WSDL by request like this:
http://web_server_host.com/WS_virtual_folder/?wsdl
I've created Siebel Inbound WS.
URL of my WS looks like this:
http://web_server_host/eai_enu/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute&UserName=SADMIN&Password=passwrd
There is a possibility to generate WSDL in the Siebel UI by clicking the button "Generate WSDL".
I tried to make my WS to return WSDL: I added one more parameter &wsdl to URL of my WS.
It doesn't work:
When I request URL by web-browser (only URL is sending, there is no soap-message) - I get error like this:
<SOAP-ENV:Envelope>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>Supplied input is not well formed or does not contain the expected data.(SBL-EAI-00137)</faultstring>
<detail>
<siebelf:siebdetail>
<siebelf:logfilename>EAIObjMgr_enu_0026_27262989.log</siebelf:logfilename>
<siebelf:errorstack>
<siebelf:error>
<siebelf:errorcode>SBL-EAI-00137</siebelf:errorcode>
<siebelf:errorsymbol>IDS_EAI_WS_BAD_XML_DOCUMENT</siebelf:errorsymbol>
<siebelf:errormsg>Supplied input is not well formed or does not contain the expected data.(SBL-EAI-00137)</siebelf:errormsg>
</siebelf:error>
<siebelf:error>
<siebelf:errorcode>SBL-EAI-00246</siebelf:errorcode>
<siebelf:errorsymbol>IDS_XMLCNV_ERR_EMPTYMSG</siebelf:errorsymbol>
<siebelf:errormsg>XML Hierarchy Converter error - empty input message, expecting an XML document in <Value> of input arguments(SBL-EAI-00246)</siebelf:errormsg>
</siebelf:error>
</siebelf:errorstack>
</siebelf:siebdetail>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
This response (error) is the same for both URL (with or without parameter &wsdl)
When I request URL by SoapUI (soap-message is sending) - I get again same response for both URL (with or without parametr &wsdl)
Is there such possibility: to get WSLD from Siebel Inbound WS by requesting URL?
I haven't found any mentions about it in the bookshelf.
Thanks in advance.
Sergey
Siebel WSDLs cannot be generated from URLs like an Axis service. The onlyway is to login to the application and click on the Generate WSDL button in the Webservices screen.
Related
I have a Mule flow where I exposed a SOAP service using Mule's CXF inbound endpoint. I configured validationEnabled="true" and also wsdlLocation="path-to\my\wsdl". With this configuration of CXF inbound endpoint, it is able to validate the incoming SOAP request and throw a SOAP fault in case there are schema validation errors. So far so good.
Now I want to customise the SOAP Fault response in case of schema validation errors.
I don't want to send SOAP Fault at all, instead I would like to send something like below in the response body
<errorCode>123</errorCode>
<errorDescription>some error description</errorDescription>
Can any one please tell me how I can achieve this?
If you are exposing a SOAP web service and want to have a validation of incoming SOAP message against the schema and put custom message, then one of the best way is to use mulexml:schema-validation-filter
for example the following code :-
<mulexml:schema-validation-filter name="Schema_Validation" schemaLocations="yourSchema.xsd" returnResult="true" doc:name="Schema Validation" />
<flow name="ServiceFlow" >
<http:listener config-ref="HTTP_Listener_Configuration" path="mainData" doc:name="HTTP Connector"/>
<message-filter onUnaccepted="ValidationFailFlow" doc:name="filter to validate xml against xsd" throwOnUnaccepted="true" >
<filter ref="Schema_Validation"/>
</message-filter>
<cxf:jaxws-service serviceClass="com.test.services.schema.maindata.v1.MainData" validationEnabled="true" doc:name="SOAP"/>
<component class="com.test.services.schema.maindata.v1.Impl.MainDataImpl" doc:name="JavaMain_ServiceImpl"/>
</flow>
and the create a sub flow to create your custom message
<errorCode>123</errorCode>
<errorDescription>some error description</errorDescription>
:-
<sub-flow name="ValidationFailFlow" >
<logger message="SOAP Request is not valid!!" level="INFO" doc:name="Logger"/>
<set-payload value="<errorCode>123</errorCode><errorDescription>Soap Validation fail!!!/errorDescription>" doc:name="Set Payload" mimeType="application/xml"/>
</sub-flow>
So now if validation is failing then it will route to your sub flow and show your custom message
note, you can create your custom message using set payload or Java class or XSLT or anything you wish :)
for more reference on mulexml:schema-validation-filter refer :- https://docs.mulesoft.com/mule-user-guide/v/3.7/schema-validation-filter
I'm very new to SOAP, and this is my first project. I am trying to connect to a HTTPS WSDL in order to pull some information on my webpage.
There is a certificate setup ready for both local server connect with the service provider server. There is a response when I try to connect the https webservice, so I believe there is no connection issue between both server :
Here is the SOAPUI sample given from the third party technical team :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soap="http://soap.ipr.tfp.com/">
<soapenv:Header/>
<soapenv:Body>
<soap:create>
<arg0>
<attribute_1>abc</attribute_1>
<attribute_2></attribute_2>
<attribute_3>abc123</attribute_3>
<attribute_4>abc234</attribute_4>
<attribute_5></attribute_5>
</arg0>
</soap:create>
</soapenv:Body>
</soapenv:Envelope>
Below is my cfm code used to connect the Webservice :
<cfscript>
ws = CreateObject("webservice", [HTTPS URL]?wsdl);
//show web service methods for debugging purposes
writeDump(ws);
// construct arguments
args = {attribute_1="abc"
, attribute_2=""
, attribute_3="abc123"
, attribute_4="abc234"
, attribute_5=""
};
// call the method
result = ws.create(arg0=args);
writeDump(result)
</cfscript>
Issue :
I'm getting below error message when execute my cfm script :
Cannot perform web service invocation create.
The fault returned when invoking the web service operation is:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: These policy alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}AsymmetricBinding: Received Timestamp does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token: The received token does not match the token inclusion requirement
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}InitiatorToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}RecipientToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IncludeTimestamp: Received Timestamp does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SignedParts: {http://schemas.xmlsoap.org/soap/envelope/}Body not SIGNED
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}EncryptedParts: {http://schemas.xmlsoap.org/soap/envelope/}Body not ENCRY...
Questions :
Is this error related to the SSL certificate setup in the ColdFusion keystore?
Anything wrong with my CFM script? Refer to the SOAPUI sample, the xml format is `[arg0] --> [attribute_1], [attribute_2] and so on. Can I pass the attributes this way?
result = ws.create(arg0=args);
The same service works from SoapUI tool. Am I missing anything here?
Thank you for your time. Your help is appreciated.
2016-05-30 - Update -
I tried to use the CFHTTP tag to submit the XML, but it seemed to return a differenct error:
<cfhttp
url = "[HTTPS URL]?wsdl"
method ="post"
result ="httpResponse"
charset ="utf-8">
<cfhttpparam
type="header"
name="accept-encoding"
value="no-compression"
/>
<cfhttpparam
type="xml"
value="#trim( soapBody )#"
/>
</cfhttp>
Error:
Here is the error message in the file content :
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>These policy alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
AsymmetricBinding: Received Timestamp does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
X509Token: The received token does not match the token inclusion requirement
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
X509Token
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
InitiatorToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
RecipientToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
IncludeTimestamp: Received Timestamp does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
SignedParts: {http://schemas.xmlsoap.org/soap/envelope/}
Body not SIGNED
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}
EncryptedParts:
{http://schemas.xmlsoap.org/soap/envelope/}
Body not ENCRYPTED
</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
The error message seems similar to cfobject tag. When I read closely in the error message, it seemed related with the X.509 ws-security encryption where the SOAP content needs to encrypted before send to the Web service request.
After did some research, the encryption flow seem work as below:
Save SOAP content into temp folder.
Used Java Class file to encrypt the SOAP content into X.509 ws-security format.
Sent new encrypted SOAP content to Webservice.
I have no idea how CF works with Java class files. Has anyone done the same encryption conversion before?
In your code to connect to web service, change
ws = CreateObject("webservice", [HTTPS URL]);
to
ws = CreateObject(
"webservice",
"[HTTPS URL]",
{wsversion="1"}
);
in case only Axis 1 works for you.
Also check at the other end, if your using ColdFusion to expose the web service make sure is set up for Axis 1.
I am a newbie to SOAP UI, I need to fetch a tag value from Test step response file (REST request's response) and set it as testsuite property.
My Request file looks like;
<xdata created_by="XXXX" created_at="Wed Mar 16 08:45:39 EDT 2016" app="" profile="" app_version="" env="DEV" tran="" service="1234">
<rows start_index="0">
<row basketId="1234566" basketVersionId="11" basketName="ORDERS_1505" basketDescription="ORDERS" createdUserName="XXXX" updatedUserName="XXX" __errorMsg="{"errors":[],"success":true}" totalApprovedOrderCount="0"/>
</rows>
</xdata>
I need to fetch basketVersionId attribute, please help.
Note: All the examples I read are dealing with Soap Response, property transfer using namespace and xpath. but that is not woking here I guess.
SOAPUI converts practically all to Xml, so despite the fact that you've a REST service you can use anyway and XPath in the property transfer testStep.
The only difference is that in property transfer you've to select:
ResponseAsXml as a property for the REST service with a Json response.
Response as a property for a SOAP service with Xml response.
So you can use: //*:row/#basketVersionId as XPath to get your attribute value.
Hope it helps,
I need to create a mule service that will POST data to a web service that expects name/value pairs (not xml), then process the XML response from that service. I cannot find a good example on how to prep the payload for an http POST.
Can someone provide some insight or examples?
What I have so far is (I don't know if 'PathToTransformerClass' is needed):
<service name="myService">
<inbound>
<vm:inbound-endpoint path="myService.request" synchronous="true">
<custom-transformer class="PathToTransformerClass" />
</vm:inbound-endpoint>
</inbound>
<outbound>
<pass-through-router>
<http:outbound-endpoint address="URIofWebServiceToPostTo" method="POST" synchronous="true">
<response-transformers>
<custom-transformer class="PathToClassToProcessTheResponse" />
</response-transformers>
</http:outbound-endpoint>
</pass-through-router>
</outbound>
</service>
The following might be helpful: http://comments.gmane.org/gmane.comp.java.mule.user/29342
I can't find any examples either, but it looks like the built-in HTTP transformers are
http-response-to-object-transformer A
transformer that converts an HTTP
response to a Mule Message. The
payload may be a String, stream, or
byte array.
http-response-to-string-transformer
Converts an HTTP response payload
into a string. The headers of the
response will be preserved on the
message.
object-to-http-request-transformer
This transformer will create a valid
HTTP request using the current message
and any HTTP headers set on the
current message.
message-to-http-response-transformer
This transformer will create a valid
HTTP response using the current
message and any HTTP headers set on
the current message.
object-to-http-request-transformer might be your best bet; perhaps you can create a map of key-value pairs and then convert that into URL encoded form? Not sure but hopefully this gives you some things to Google.
Are you asking about how to take XML and create key value pairs to send out via HTTP? For that you can use an XLST transformer where in the XSL you set the method output to be text.
1) Let variables=<map><entry><string>idEvent_Type</string><string>1</string></entry></map>&options=user:admin
be the Map body to post as HTTP request.
2) URL encode it (eg. using http://meyerweb.com/eric/tools/dencoder/)
which produce :
variables%3D%3Cmap%3E%3Centry%3E%3Cstring%3EidEvent_Type%3C%2Fstring%3E%3Cstring%3E1%3C%2Fstring%3E%3C%2Fentry%3E%3C%2Fmap%3E%26options%3Duser%3Aadmin
3) then create a Mule set-payload transformer :
<set-payload value="variables%3D%3Cmap%3E%3Centry%3E%3Cstring%3EidEvent_Type%3C%2Fstring%3E%3Cstring%3E1%3C%2Fstring%3E%3C%2Fentry%3E%3C%2Fmap%3E%26options%3Duser%3Aadmin
" doc:name="Set playload"/>
4) then create a Mule HTTP endpoint :
<http:outbound-endpoint exchange-pattern="request-response" host="..." port="..." path="..." user="..." password="..." contentType="application/x-www-form-urlencoded" doc:name="POSTHTTPRequest"/>
and it works
Maybe U can give a try using Object-to-http-request-transformer as this transformer will create a valid HTTP request using the message currently received and any HTTP headers set on the current message.
Have never tried it, but that is the only transformer I can get in my mind after reading ur query...hope it works.. :D
Has anyone gotten Bing Map Web Services (formerly Virtual Earth Web Services) working with Delphi?
Based on my experiences so far (both using Delphi and Visual Studio C#), I'm about ready to give up on it and go with the MapPoint Web Service until a future version of Bing Maps Web Services comes out. However, I thought I'd post a question here as a last resort...
I imported the Token Service and Geocode Services WSDL documents.
I was successfully able to get a token from the token service, but have been unable to get the Geocode service to work at all. It always returns the following error message:
The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
I noticed Delphi wasn't specifying a value for the SOAPAction header, so I tried specifying "http://staging.dev.virtualearth.net/webservices/v1/geocode/contracts/IGeocodeService/Geocode" and got the following error message instead:
The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
Below is my Delphi code and the raw XML being sent, then the raw XML being sent by a similar call from Microsoft's sample C# code. There are several differences in the XML, but I'm not sure what difference(s) is the key.
var
Service: IGeocodeService;
Request: Geocode;
Response: GeocodeResponse3;
ResponseIndex: Integer;
Token: WideString;
Filters: ArrayOfFilterBase;
begin
Token := GetToken;
Service := GetIGeocodeService;
Request := Geocode.Create;
try
Request.request := GeocodeRequest.Create;
Request.request.Credentials := GeocodeService.Credentials.Create; // Freed by GeocodeRequest class
Request.request.Credentials.Token := Token;
Request.request.Query := AddressEdit.Text;
Request.request.Options := GeocodeOptions.Create;
SetLength( Filters, 1 );
Filters[ 0 ] := ConfidenceFilter.Create;
ConfidenceFilter( Filters[ 0 ] ).MinimumConfidence := GeocodeService.High_;
Request.request.Options.Filters := Filters;
Response := Service.Geocode( Request );
try
for ResponseIndex := Low( Response.GeocodeResult.Results ) to High( Response.GeocodeResult.Results ) do
begin
OutputMemo.Lines.Add( Response.GeocodeResult.Results[ ResponseIndex ].DisplayName );
end;
finally
Response.Free;
end;
finally
Request.Free;
end;
end;
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="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/">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:NS2="http://dev.virtualearth.net/webservices/v1/geocode/contracts" xmlns:NS3="http://dev.virtualearth.net/webservices/v1/geocode" xmlns:NS4="http://dev.virtualearth.net/webservices/v1/common">
<NS1:Geocode xmlns:NS1="http://dev.virtualearth.net/webservices/v1/geocode/contracts">
<parameters href="#1"/>
</NS1:Geocode>
<NS2:Geocode id="1" xsi:type="NS2:Geocode">
<request href="#2"/>
</NS2:Geocode>
<NS3:request id="2" xsi:type="NS3:GeocodeRequest">
<Credentials href="#3"/>
<Options href="#4"/>
<Query xsi:type="xsd:string">Some Address</Query>
</NS3:request>
<NS4:Credentials id="3" xsi:type="NS4:Credentials">
<Token xsi:type="xsd:string">cbYkKgNlrsGnZbn3HRP7Xp5LJMv3RR_5qECwgB792COfY3EPmviaDpZ4mmD3fDP1Osc6fWUkTptog7bfgM73bA2</Token>
</NS4:Credentials>
<NS3:Options id="4" xsi:type="NS3:GeocodeOptions">
<Filters xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="NS3:FilterBase[1]">
<item href="#5"/>
</Filters>
</NS3:Options>
<NS3:ConfidenceFilter id="5" xsi:type="NS3:ConfidenceFilter">
<MinimumConfidence xsi:type="NS4:Confidence">High</MinimumConfidence>
</NS3:ConfidenceFilter>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<Geocode xmlns="http://dev.virtualearth.net/webservices/v1/geocode/contracts">
<request xmlns:a="http://dev.virtualearth.net/webservices/v1/geocode" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Credentials xmlns="http://dev.virtualearth.net/webservices/v1/common">
<ApplicationId i:nil="true"/>
<Token>pezCDpJoxdCG63NQdJUGkTrYYalnuSQDwuIC9FvheFAd9MIPO75qX9n7il0dx3eTEHlN2877PzN1_6YbQDL5tg2</Token>
</Credentials>
<Culture i:nil="true" xmlns="http://dev.virtualearth.net/webservices/v1/common"/>
<ExecutionOptions i:nil="true" xmlns="http://dev.virtualearth.net/webservices/v1/common"/>
<UserProfile i:nil="true" xmlns="http://dev.virtualearth.net/webservices/v1/common"/>
<a:Address i:nil="true" xmlns:b="http://dev.virtualearth.net/webservices/v1/common"/>
<a:Options>
<a:Count i:nil="true"/>
<a:Filters>
<a:FilterBase i:type="a:ConfidenceFilter">
<a:MinimumConfidence>High</a:MinimumConfidence>
</a:FilterBase>
</a:Filters>
</a:Options>
<a:Query>1 Microsoft Way, Redmond, WA</a:Query>
</request>
</Geocode>
</s:Body>
</s:Envelope>
My best guess is that Delphi seems to be producing too many Geocode elements - there doesn't appear to be any thing that corresponds to NS2:Geocode in the C# produced XML. If you can intercept the XML and change it so that it looks like this, who knows - it might work:
...
<NS1:Geocode xmlns:NS1="http://dev.virtualearth.net/webservices/v1/geocode/contracts">
<parameters href="#2"/>
</NS1:Geocode>
<NS3:request id="2" xsi:type="NS3:GeocodeRequest">
...
The other problem could be that the Bing service doesn't support the way Delphi organizes the SOAP request.
It that doesn't work, perhaps you can find another SOAP library you can use with Delphi - perhaps resorting to wrapping a library with a C or COM interface.
I have exatctly the same problem. I run Delphi 2006, used WSDLImp.exe in command mode; needed version 11.0 of 2006 to get the import work. What do you use? We have the intention to try RemObjects, version 6. Any guess if that would work better?
Cheers,
Lars