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

Soap parameter type DateTime on wsdl #52

Open
fregian opened this issue Jun 25, 2024 · 1 comment
Open

Soap parameter type DateTime on wsdl #52

fregian opened this issue Jun 25, 2024 · 1 comment

Comments

@fregian
Copy link

fregian commented Jun 25, 2024

Hello,
i have generated class by wsdltophp and all is ok, but now I need to use a method that requires two parameters of type DateTme and defined in the wsdl as:
<xs:element name="arg4" type="xs:dateTime" minOccurs="0" />
<xs:element name="arg5" type="xs:dateTime" minOccurs="0" />
The method generated by wsdltophp defines ar4 and arg5 as string.
Whatever value I pass to the method, the ws receives NULL,
How can I solve?

this is the code on generated class:
/**
* Set arg4 value
* @param string $arg4
* @return \StructType\GetDocumentIdsList
*/
public function setArg4($arg4 = null)
{
// validation for constraint: string
if (!is_null($arg4) && !is_string($arg4)) {
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($arg4, true), gettype($arg4)), LINE);
}
$this->arg4 = $arg4;
return $this;
}

/**
* Set arg5 value
* @param string $arg5
* @return \StructType\GetDocumentIdsList
*/
public function setArg5($arg5 = null)
{
// validation for constraint: string
if (!is_null($arg5) && !is_string($arg5)) {
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($arg5, true), gettype($arg5)), LINE);
}
$this->arg5 = $arg5;
return $this;
}

Thank you and excuse for my bad english

@mikaelcom
Copy link
Member

Have you dumped the XMLRequest sent? What does it contain?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants