VMware Cloud Community
colinj
Contributor
Contributor
Jump to solution

SOAP plug-in and HTTP 301 Moved Permanently

Howdy all,

I'm working on a workflow that will interact with another web service (BMC Remedy/AR) and I've run in to a problem.

The URL in the WSDL that is provided is http but that URL redirects to https (the rest of the URL is the same). If I try and hit the service with a browser (firefox) the browser does the right thing and redirects to the new https URL. However, when the workflow that I've built with the SOAP plug-in gets the 301 error it just fails. Is there something I can do to get the workflow to automagically follow the redirect? Or do I need to code up something myself.

Colin J.

Reply
0 Kudos
1 Solution

Accepted Solutions
sanchezs
VMware Employee
VMware Employee
Jump to solution

Cool! Thanks for sharing it! Smiley Happy

Sergio

View solution in original post

Reply
0 Kudos
5 Replies
sanchezs
VMware Employee
VMware Employee
Jump to solution

Hi Colin,

Most probably the SOAP engine's HTTP client inside the plug-in is so simple that it doesn't understand about HTTP redirection status code. In any case I guess you are talking about the SOAP address location URL inside the WSDL file, not the WSDL file URL itself, aren't you?

To solve that issue, you can modify the URL that the plug-in is using to invoke the SOAP service like this:

  • Using the "Update a SOAP host" workflow, you can edit the content of the WSDL file and change the URL of the service.
  • Using the "Update a SOAP host with an endpoint URL" workflow (from the version 1.0.1 of the plug-in, recommended), you can edit directly the URL of the service without editing the whole WSDL.

But just to try it... when you create a SOAP host with the plug-in, if you import the WSDL file from a URL via HTTP you get an HTTP SOAP address location URL. But if you try to import the WSDL file from the same URL via HTTPS, do you get the same HTTP SOAP address location URL or is it HTTPS one? Maybe if the WSDL is auto-generated you'll get the proper HTTPS URL for the service if you try to import the WSDL from a HTTPS URL.

And keep in mind that if you are using HTTPS you'll need to import the  SSL certificate into vCO. You can do it manually from the vCO Web  Configurator, or it will be automatically added if you add the SOAP host  importing the WSDL file from a HTTPS URL.

I hope it helps.

Regards,

Sergio

colinj
Contributor
Contributor
Jump to solution

Sergio,

Thanks! Those are some great suggestions.

Yes, I am refering to the location URL in the WSDL and the the URL of the WSDL itself, but thanks for asking Smiley Happy

I've checked and the location URL is not automagically generated based on the WSDL URL. I'm off now to try the editing and to grab the latest SOAP plug in.

Thanks!

Reply
0 Kudos
colinj
Contributor
Contributor
Jump to solution

Sergio! Thanks again!

I updated to the 1.0.1 version of the SOAP plug-in and used the "Update a SOAP host with an endpoint URL" workflow, changed the location url to use https and it worked.

Awesome!

Reply
0 Kudos
colinj
Contributor
Contributor
Jump to solution

Points to Sergio for the correct answer.

Reply
0 Kudos
sanchezs
VMware Employee
VMware Employee
Jump to solution

Cool! Thanks for sharing it! Smiley Happy

Sergio

Reply
0 Kudos