Loading ...
Sorry, an error occurred while loading the content.

2149maptype

Expand Messages
  • floriantreml
    Nov 29 6:52 AM
      Hi!
      I'm using a webservice which takes a complex object, which is defined
      in an xsd file, as parameter. I have to set the namespace of this
      element by using the maptype-Funktion.
      The name of the type contains some dots, as the schema is
      automatically generated from a Java-Class.

      $terminal_ws->maptype->{'at.co.sbs.kixfs.agent.command.CommandData'}
      = 'http://www.terminal.com/schemas/TerminalRemoteInterface';

      The problem is that the soap type isn't mapped to this namespace
      while serializing, it is always mapped to the default
      namespace "http://namespaces.soaplite.org/..". I think the problem is
      due to the dots in the typename: As soon as I remove the package part
      of the typename and using this type when building the soap object,
      the element is correctly set into the given namespace (but, of
      course, the soap server doesn't recognize the element any more).
      Can anyone help me ?
      thanks in advance,
      Treml Florian

      my $terminal_ws = SOAP::Lite
      -> serializer(MySerializer -> new)
      -> uri('http://sbs.co.at/ejb.Terminal')
      -> proxy
      ('http://localhost:8081/kixfswebservices/servlet/rpcrouter');

      $terminal_ws->maptype->{'at.co.sbs.kixfs.agent.command.CommandData'}
      = 'http://www.terminal.com/schemas/TerminalRemoteInterface';

      my $commanddata = SOAP::Data->name("command")
      ->type("at.co.sbs.kixfs.agent.command.CommandData")
      ->uri("http://sbs.co.at/ejb.Terminal")
      ->value([
      SOAP::Data->name("terminalID")->value("R001J001"),
      SOAP::Data->name("source")->value("sendcommand.pl"),
      SOAP::Data->name("command")->value("openTerminal"),
      SOAP::Data->name("commandID")->value("0815") ]);

      my $result = $terminal_ws -> executeCommand($commanddata);
    • Show all 2 messages in this topic