We have SAG Webmethods implementation being used as an API Gateway in our project. We do not have much expertise in WebMethods. Based on a document received from the team which was maintaining this gateway implementation we are trying to build a custom gateway solution using open source software.
There is a soap web service which is being accessed by clients using /soap URL but based on looking at the web service implementation with WebMethods, we can see that the soap web service end point is of the pattern /ws/**.
Any idea where can we check to find how the mapping is happening from incoming url /soap to actual soap webservice end point /ws/**? We checked under "Settings > URL Aliases" of Web Methods Integration Server but there is no url alias set for this mapping.
Could you please help provide some pointers on where such a configuration could be set up for this redirection?
Regards,
Jacob
if i understood the issue the right way, this configuration is done as a part of webMethods code only. you need to open the wM packages in SoftwareAG Designer and in the Service Development perspective of Designer ,Connect to the Integration Server with those packages and have a look at the contents. You need to find something called WSD. if you right click and say property you will see the Element Type as :Web Service Descriptor.Open the WSD and on the right side you can see properties window which can have properties like WSDL URL /Source URI. this is where this /ws/ Config is done. Any requests hitting this URL will be handled by the associated WSD defined.
There is also an option to add an alias here in
admin Console--->Settings-->WebService--->Create provider /Web Service
endpoint Alias
.
I am a new with twilio.
I am trying to make a call using CallResource.Create(to, from, url: _url);
regarding the URL : I have the Azure account. I have uploaded custom xml.
Below you can find my xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say voice="alice">Thanks for trying our documentation.Enjoy!</Say>
<Play>http://demo.twilio.com/docs/classic.mp3</Play>
</Response>
For testing i am using test message.
http://demo.twilio.com/docs/classic.mp3 , in the future i am planning to upload custom mp3 file also to azure file storage.
The end URL is
https://xxxx.file.core.windows.net/xxxxx/20180719112627.xml?sv=2017-11-09&ss=bfqt&srt=sco&sp=rwdlacup&se=2018-07-31T18:27:28Z&st=2018-07-01T10:27:28Z&spr=https,http&sig=gNqLuAofhePeOzuyVFWHSb0TCydgIW3ShOrRRfFEZ7o%3D
Unfortunately, i have got the exception:
"An attempt to retrieve content from https://xxxxxxx.file.core.windows.net/xxxxxxx/20180719112627.xml?sv=2016-05-31&sig=Pa4ery3QIruwYbNSJ1Nu7Y3EpKLjbd5mJXi46vnpoyU%3D&spr=https%2Chttp&se=2019-07-19T09%3A26%3A53Z&srt=sco&ss=bfqt&sp=raupwl returned the HTTP status code 405"
<?xml version="1.0" encoding="utf-8"?>
<Error>
<Code>UnsupportedHttpVerb</Code>
<Message>The resource doesn't support specified Http Verb.
RequestId:907409a8-d01a-0051-1c43-1f4bf1000000
Time:2018-07-19T09:30:41.8204847Z</Message>
</Error>
Rerarding CORS for FILE SERVICE :
it is
Is there a document/guide describing the requirements how to configure the azure environment for integration with twilio?
Many thanks for help.
Have you tried using the SAS url by generating one using Storage Explorer or Azure Portal?
I have the WSO2 Developer Studio Eclipse Plugin downloaded. And I was looking at this tutorial: http://wso2.com/library/tutorials/2010/07/eclipse-bpel-designer-wso2bps-tutorial/. But it seems to be talking about using SOAP. But my webservices, which are written in PHP(in live servers) are REST using JSON. Accepts data via HTTP GET methods by these webservices and respond back with JSON data.
So how will I implement a BPEL project making use of the JSON webservices? Any ideas or suggestion? Am completely new to this. Thank you.
EDIT
When I created the BPEL Process, I have used HTTP from the dropdown instead of SOAP
WSO2 uses a custom variant of the Apache ODE engine for executing BPEL processes. ODE provides extensions for REST, which you can try out. However, I am not sure if these extensions also support JSON or if they just allow XML data. Also have a look at this answer.
Hi (Sorry for my english),
I would be use the new tools windows : REST Client in PHPStorm 6, but i have a little problem.
I write my soap url and it's ok, i retrieve the xml response (look at Heberger image http://img15.hostingpics.net/thumbs/mini_529269screen1.png).
After that i want call the method : login but i don't see how that work, how pass this method to the rest api. (look at Heberger image http://img15.hostingpics.net/thumbs/mini_696499screen2.png)
And the xml response was :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>Sender</faultcode><faultstring>Invalid XML</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Thank you for your response (and correction on my bad english :( )
Judging the response your service uses SOAP, why this client is tailored for REST. Take a look at Representational state transfer (REST) and Simple Object Access Protocol (SOAP) to get the difference.
Basically to perform the request you need to provide a properly formatted request body (which may be quite elaborate).
Hello WSO2 community and hello Stackoverflow,
my testing of the SOA suite starting from the ESB is going good: now the ESB recognises external services, create correct proxies that return correct results.
SOLVED
About that, I have two issues: the first is that the "try it"
functionality raises the exception:
"Cannot find dispatch method for {http://schemas.xmlsoap.org/soap/envelope/}Envelope
[tagOpened]/soapenv:Text[tagClosed]"
when i try to send a SOAP enveloped created for the mock service of
the web service proxied.
Anyway, if I try the proxy service from an external client (created on
Netbeans) it works great.
ANSWER
For the first part, the reason is most probably the cross domain issue as try-it is sending messages through a java script stub from
the browser. You will notice that this works great when the service
itself is hosted in the ESB itself, because the request passes through
the same domain. This is why, although, it works perfectly through a
normal client invocation, it does not work through try-it.
The second issue is that I'm not able to orchestrate two services. My objective is sending the input of the first service to the second service, and then to the user.
I'm working on the tutorial Tharindu Mathew suggested: everything now makes sense to me except on one thing: the XSLT transformation.
Here is the out sequence the tutorial suggests you to create:
<outSequence xmlns="http://ws.apache.org/ns/synapse">
<switch source="get-property('STATE')">
<case regex="PERSON_INFO_REQUEST">
<log level="full">
<property name="sequence" value="outSequence - STATE 01 - response from PersonInfoService" />
</log>
<xslt key="xslt">
<property name="amount" expression="get-property('ORG_AMOUNT')" />
</xslt>
<log level="full">
<property name="sequence" value="outSequence - STATE 01 - request for CreditService" />
</log>
<property name="STATE" value="CREDIT_REQUEST" />
<send>
<endpoint key="CreditEpr" />
</send>
</case>
<case regex="CREDIT_REQUEST">
<log level="full">
<property name="sequence" value="outSequence - STATE 02 - response from CreditService" />
</log>
<send />
</case>
</switch>
</outSequence>
Now, focusing on the XSLT node of the first case of the switch, you can see that there's just a get for the amount property.
So that I think we have an XML from the in sequence that states the ID, and this get on the amount property (and I don't know what it does).
The tutorial then suggests:
To create the request to this CrediService, we use the following XSLT with the XSLT mediator. Note, we are using the ORG_ID that we stored in this XSLT as a XSLT parameter and using the XSLT mediator as well.
And here is the XSLT showed in the tutorial:
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
xmlns:ns="http://samples.esb.wso2.org"
xmlns:ax21="http://samples.esb.wso2.org/xsd"
exclude-result-prefixes="ns fn">
<xsl:param name="amount"/>
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates select="//ns:getResponse" />
</xsl:template>
<xsl:template match="ns:getResponse" xmlns:ns="http://samples.esb.wso2.org">
<sam:credit xmlns:sam="http://samples.esb.wso2.org" xmlns:xsd="http://samples.esb.wso2.org/xsd">
<sam:info>
<xsd:amount><xsl:value-of select="$amount"/></xsd:amount>
<xsd:personInfo>
<xsd:address><xsl:value-of select="ns:return/ax21:address"/></xsd:address>
<xsd:id><xsl:value-of select="ns:return/ax21:id"/></xsd:id>
<xsd:name><xsl:value-of select="ns:return/ax21:name"/></xsd:name>
</xsd:personInfo>
</sam:info>
</sam:credit>
</xsl:template>
</xsl:stylesheet>
I was asked to put a similar file into the resources directory of WSO2 ESB, but this file is never used in the tutorial:
Copy the personToCredit.xslt in the sample zip to resources directory of WSO2 ESB.
---------LITTLE PARENTHESIS-----------
The WSDL file was not used either after it was stated:
Copy the CreditProxy.wsdl in the sample zip to the resources directory of the WSO2 ESB.
I cannot find the WSDL file in the Configuration/Governance Registry, and I don't know how to address it, so I chose to specify it inline instead.
---------LITTLE PARENTHESIS END-----------
This sentence is followed by the XSLT file text. My main question now is:
Where should I put this XSLT? I do not know where to put the XSLT mediator, neither how to build it.
Should I rely on registries?
A perfect answer could be the code of the out sequence, and the specified connection with the XSLT mediator suggested.
OverTheBitStair
Hi OverTheBitStair (nice nick!),
For the first part, the reason is most probably the cross domain issue as try-it is sending messages through a java script stub from the browser. You will notice that this works great when the service itself is hosted in the ESB itself, because the request passes through the same domain. This is why, although, it works perfectly through a normal client invocation, it does not work through try-it.
For the second part, the short answer is yes, it is possible. In terms of the ESB, we refer to it as a light-weight orchestration engine in addition to being a mediation engine. This means for light-weight and short-lived (<1 day) processes we can solve the orchestration requirements using the ESB without bringing in the Business Process Server.
To do this, we use this method called service chaining. What it does is introduce a method to get some output out of the initial service invocation and use it in a subsequent invocation. The article WSO2 ESB by example - Service Chaining should help you with implementation details on what you are looking for.
Hope this helps.
If you create a service chaining scenario where your proxy service calls two other services and return the result to the caller of the proxy service, it would look something like this:
Caller --> Proxy Service -- seq_A --> Service1 -- seq_B --> Service2 -- seq_C --> (proxy serviced response) --> Caller
In this case, seq_A would be the in sequence of the proxy service, seq_C the out sequence of the proxy service and seq_B another named sequence.
Input, i.e. the message body, to seq_A would be the input to proxy service. seq_A would contain a send mediator at the end and at that point in the sequence the message context would be the input to Service1. The send mediator also points to seq_B to be executed for the reply.
At start of seq_B the message body contains the output from Service1. If you want to keep some message data from before the service call you need to save that in properties in the context.
At the end of seq_B you would have a send mediator; at that point the message body should contain the input to Service2, The send mediator would in this case not need to point to an explicit reply sequence, if seq_C is the out sequence of the proxy service - that one will be used by default then.
When seq_C is executing the message body at that point is the response from Service2. Again, if you need to use/combine with some data prior to the call to Service2, you need that to be saved into properties.
Depending on the particular needs for the input and transformations needed at each step it can be fairly straightforward or a bit cumbersome to handle.
What also should taken into consideration is what needs to happen in error scenarios, as this may add some additional complexity, depending on the requirements.