gowsdl icon indicating copy to clipboard operation
gowsdl copied to clipboard

where to define the type String

Open devuser opened this issue 10 years ago • 7 comments

In wsdl :

I use gowsds to get the .go file from the wsdl .

Find the String type in the .go file because it set the Param as String type. But How can I define the String type ? or where is the String type ?

devuser avatar Oct 15 '15 03:10 devuser

I'm sorry you are running into issues. However, I'm not sure I'm following. Would you mind elaborating a bit more?

c4milo avatar Oct 15 '15 04:10 c4milo

@c4milo I'm hitting an a similar issue. I'm generating from a WSDL document and I'm ending up with a lot methods like the following:

/* (1.12) Get Events */
func (service *ApplicationServiceHttpGet) GetEvents(request *String) (*ClsEvents, error) {
    response := new(ClsEvents)
    err := service.client.Call("", request, response)
    if err != nil {
        return nil, err
    }

    return response, nil
}

The problem is that String type doesn't seem to be defined anywhere.

So when playing around with this my WSDL file seems to have the operations specified three times as follows:

  <wsdl:portType name="ApplicationServiceSoap">
    ...
    <wsdl:operation name="GetEvents">
      <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">(1.12) Get Events</wsdl:documentation>
      <wsdl:input message="tns:GetEventsSoapIn" />
      <wsdl:output message="tns:GetEventsSoapOut" />
    </wsdl:operation>
    ...
  </wsdl:portType>
  <wsdl:portType name="ApplicationServiceHttpGet">
    ...
    <wsdl:operation name="GetEvents">
      <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">(1.12) Get Events</wsdl:documentation>
      <wsdl:input message="tns:GetEventsHttpGetIn" />
      <wsdl:output message="tns:GetEventsHttpGetOut" />
    </wsdl:operation>
    ...
  </wsdl:portType>
  <wsdl:portType name="ApplicationServiceHttpPost">
    ...
    <wsdl:operation name="GetEvents">
      <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">(1.12) Get Events</wsdl:documentation>
      <wsdl:input message="tns:GetEventsHttpPostIn" />
      <wsdl:output message="tns:GetEventsHttpPostOut" />
    </wsdl:operation>
    ...
  </wsdl:portType>
...

I just deleted the two additional application services (in this case ApplicationServiceHttpPost and ApplicationServiceHttpGet) from the code post generation and this appears to have fixed the problem

nicwest avatar Nov 24 '15 15:11 nicwest

meet a same problem too... = =

chenjie4255 avatar Jun 30 '16 06:06 chenjie4255

meet the same problem, anyone who knows how to solve this problem?

sillydong avatar Nov 07 '16 08:11 sillydong

I'm having the same issues as well. I run the command gowsdl -o arws.go arwshdlr.wsdl and arws.go is successfully generated. When I go to compile, I get the error of undefined String caused by the functions generated for each SOAP method. I.E. the error will be on afunction generated in arws.go: func (service *ArwshdlrPortType) ArwsbinqgetBill(request *String) (*String, error) {...}

andrewsauder avatar Jan 12 '17 03:01 andrewsauder

same for me

zaretskysa avatar Feb 22 '17 09:02 zaretskysa

I also got this problem. Seems that *String should actually be one of the generated structs?

andreynering avatar Sep 22 '17 19:09 andreynering