Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to generate a SOAP request using something else instead of operation? #766

Closed
kulldox opened this issue Jun 15, 2016 · 3 comments
Closed

Comments

@kulldox
Copy link

kulldox commented Jun 15, 2016

My WSDL has a structure like this:

...
            <xsd:element name="HelloWorldReq">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element type="xsd:long" minOccurs="1" maxOccurs="1" name="customerId" />
...

    <wsdl:message name="HelloWorldRequestMsg">
        <wsdl:part name="body" element="typens:HelloWorldReq" />
    </wsdl:message>
...
        <wsdl:operation name="heloworld">
            <wsdl:input name="heloworldInput" message="typens:HelloWorldRequestMsg" />
            <wsdl:output name="heloworldOutput" message="typens:StandardResponseMsg" />
            <wsdl:fault name="FaultName" message="typens:FaultMsg" />
        </wsdl:operation>
...

And I would like to use the HelloWorldReq element name instead of operation heloworld for the SOAP request generation.

So, instead of:

savonClient.call(:heloworld, message: ...

do something like:

savonClient.call("HelloWorldReq", message: ...
@kulldox
Copy link
Author

kulldox commented Jun 15, 2016

ok, figured out a way:

    def getSoapOperationByRequestType(requestType)
        document = Wasabi.document File.read($k.get('dspaWSDL'))
        document.operations.select {|f,v| v[:input] == requestType}.keys[0]
    end

so this will return the operation:

getSoapOperationByRequestType("HelloWorldReq")

output:

heloworld

Just in case anybody else will need it :)

@stale
Copy link

stale bot commented Feb 19, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 19, 2018
@stale
Copy link

stale bot commented Feb 26, 2018

This issue is now closed due to inactivity. If you believe this needs further action, please re-open to discuss.

@stale stale bot closed this as completed Feb 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant