mrtsherman
mrtsherman

Reputation: 39892

Incorrect xmlns in a WSDL

I am trying to import a WSDL into a SOAP-UI project - which is a simple tool for testing SOAP calls. When I try and import the wsdl I get the following error:

WSDLException (at /wsdl:definitions/portType/wsdl:operation[1]/wsdl:input): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'nrns:getDynamicsUploadQueueRequest

From inspecting the WSDL I see that there is no xmlns:nrns declaration under the definitions area. I read in a forum that I can resave the WSDL to disk and correct the WSDL. However, I'm an extreme SOAP noob and I don't know what the definition is supposed to be. I think that if I just add the following to the definitions area it should sort things out. Anyone know what I would replace those question marks with? Am I completely wrong in my approach?

xmlns:nrns="???"

I don't own or have control over the WSDL. The WSDL and XML are below for reference.

https://apps.net-results.com/soap/v1/NRAPI.wsdl

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name='NRAPI' targetNamespace='https://apps.net-results.com/soap/v1'
                  xmlns:nrtypens="https://apps.net-results.com/soap/v1/NRAPI.xsd"
                  xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
                  xmlns:xsd='http://www.w3.org/2001/XMLSchema'
                  xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
                  xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
                  xmlns='http://schemas.xmlsoap.org/wsdl/'>

Upvotes: 3

Views: 6267

Answers (2)

John Saunders
John Saunders

Reputation: 161831

This is an error in the WSDL. It appears that the "nrns" is meant to be https://apps.net-results.com/soap/v1. Note that this is the targetNamespace of the WSDL, in the definitions element.

So just add

xmlns:nrns='https://apps.net-results.com/soap/v1'

in the definitions element, and you should be fine.

Upvotes: 3

Charu Khurana
Charu Khurana

Reputation: 4551

Namespaces are a way to associate your elements to a particular type to avoid name conflicts. Refer here http://www.w3schools.com/xml/xml_namespaces.asp

You can pretty much anything is ??? and that should solve your problem. It needn't be any valid URL because it's never going to go that URL on internet and check its validity.

However, I suggest you get the corrected WSDL from its owner and use that else later you may end up with problems regarding namespace mismatch wasting lot of time. For time being to continue with your testing you may pretty much put anything in <wsdl:definition> tag, something like:

xmlns:nrns="http://fakeurl.com"

p.s. Play with your imagination :)

Upvotes: 1

Related Questions