I have WAS7 installed & applied fixpack21 last week, since then i was seeing jax-ws web services xml response contains xsi:nil="true" even the element had a value. this is happening for decimal fields. Any thoughts please?
Thanks
Related
I am using ZEEP to make SOAP requests and it is easy and works great.
The problem is that the endpoint URL (in the WSDL) isn't correct.
I can solve the problem by editing the WSDL directly, but this isn't scalable.
I reviewed the ZEEP documentation about creating service proxies but I don't understand it and am having errors. Here is the part of the WSDL containing the bad URL:
</binding>
<service name="DeviceConfigurationService">
<port name="DeviceConfigurationPort"
binding="xrx:DeviceConfigurationBinding">
<soap:address
location="http://localhost/webservices/office/device_configuration/1"/>
</port>
</service>
the location is what I need to change. I need to change from "localhost" to a LAN IP address. This value may change frequently so I don't want to have to edit the WSDL every time.
Does anyone know how to do this with Zeep?
Any help is greatly appreciated!
I know this question is old, but I just had this same issue as I was accessing a third-party SOAP API with a WSDL that pointed to the wrong endpoint (the third party told me the correct endpoint but hadn't updated their WSDL). The accepted answer did point me in the right direction, but I'd like to offer some additional details that weren't immediately apparent to a fairly novice developer such as myself.
Start by noticing that Zeep's documentation shows that the method zeep.Client.create_service() has two parameters.
binding_name – The QName of the binding
address – The address of the endpoint
Figuring out the binding_name
Option 1 - Read through the WSDL
The binding_name comes from the attribute binding in the WSDL. The issue is that the value of that attribute usually includes a reference to a name elsewhere in the WSDL that you have to manually resolve before using it to create a custom service.
In the case of the excerpt from the OP's WSDL (slightly formatted and ***emphasis added
***)...
<service name="DeviceConfigurationService">
<port name="DeviceConfigurationPort" ***binding="xrx:DeviceConfigurationBinding"***>
<soap:address location="http://localhost/webservices/office/device_configuration/1"/>
</port>
</service>
... the value of binding is "xrx:DeviceConfigurationBinding".
While this is the binding_name used by Zeep, you can't just copy and paste it into the parameter of create_service() because it is partially comprised of xrx - a name defined locally within the WSDL. Zeep automatically resolves the value of this kind of name when it originally parses the WSDL, so when you tell Zeep to point an existing binding to a different endpoint you have to resolve the binding name yourself so Zeep knows which binding you are talking about (that's why #jeffgabhart used {https://path-to-xrx-namespace} in his answer). In the end you should end up with complete binding_name of the format {NAMESPACE}BINDING.
Note that xrx isn't the only possible name. For me, the name was tns and for you it may be something different. Whatever it is, you should be able to find the definition of that name somewhere in the WSDL.
Option 2 - Use Zeep's WSDL parsing utility
Another option is the one suggested by #576i. Running the command python -mzeep WSDL_URL will spit out the information Zeep gathers from the given WSDL. One heading should say "Bindings" followed by a list (possibly of length 1) of binding_name's. From there you can copy the one you need to change the endpoint for.
Option 3 - Get it from the Zeep Client object
This one feels more like a hack, but list(zeep_client.wsdl.port_types) gives a list of all binding names that Zeep found in the WSDL used to create the zeep_client.
Figuring out the address
Lastly, for the sake of completeness, the address is simply the new endpoint you want to use instead of the one defined in the WSDL.
I hope this helps smooth out the learning curve for someone!
client = Client('http://localhost/webservices/office/device_configuration/1?wsdl')
service = client.create_service(
'{http://path-to-xrx-namespace}DeviceConfigurationBinding',
'http://127.0.0.1/webservices/office/device_configuration/1')
service.submit('something')
I'm trying to use boots-faces for the first time and was looking for some validations at the client side like minimum length, maximum length or exact length.
I was able to find maxLength but I'm struggling to find how to do other length validations. Kindly suggest.
We didn't implement it yet. Please open a feature request at https://github.com/TheCoder4eu/BootsFaces-OSP/issues.
By the way, how do you want the validation messages to be displayed? Currently, maxLength is simply added to the HTML sourcecode. So it's up to the browser to interpret it. In the case of maxLength, that's easy because it suffices to stop accepting input after reaching the maximum length.
minLength, exactLength, and pattern are different. They have to be able to show regular error messages. That amounts to finding the corresponding h:message(s), b:message(s), or p:message(s) tag and populating it with error messages on the client side.
The PrimeFaces team implemented the feature. That was a lot of work, and my perception is that few people miss it. I'd be happy to be proven wrong because the BootsFaces story is all about shifting logic to the client.
In the meantime, just follow the suggestion of #Tiny above and BalusC and use the AJAX engine:
<b:input value="...">
<f:validateLength minimum="..." maximum="..." />
<f:validateRegex pattern="^$|^[A-Za-z-_./\s]{2,50}$" />
</b:input>
I have some InfoPath 2010 forms with custom code that submits information to SharePoint 2010 form-enabled libraries. One of the forms has a date field, chosen by a picker and stored in a Date/Time column in the library. The form had been working fine for months, but one day it just started failing with the following error:
There has been an error while processing the form.
Click OK to resume filling out the form. You may want to check
your form data for errors.
When I click "show error details", it shows error code 5337 and gives a correlation ID.
When I look up the error in the event log, the details are as follows:
Business logic failed due to an exception. (User: XXX\frank, Form
Name: Miscellaneous Form, IP: , Request:
http://intranet//apps/_layouts/FormServer.aspx
XsnLocation=/FormServerTemplates/Miscellaneous
Form.xsn&Source=/apps/SitePages/expenses.aspx&DefaultItemOpen=1,
Form ID: urn:schemas-microsoft-com:office:infopath:
Miscellaneous-Form:-myXSD-2012-05-14T12-19-23,
Type: FormatException,
Exception Message: String was not recognized as a valid DateTime.)
I am at a complete loss to understand how this problem can have arisen. No aspect of the solution was touched between when it was working and when it stopped. The date format on the InfoPath form is the same as the date format in the SharePoint list column. The system locale and regional settings are consistent everywhere and have not been changed. The problem arose after a slew of Windows updates on the 20th of January, so I'm wondering if one of those might have caused the problem.
The next steps I plan to take are to rebuild and redeploy the form to see if that fixes the problems. However this is code I inherited and it's part of a larger solution, so I'm nervous about redeployment in case I break other things. That's why I wanted to ask here if anyone has come across this or a similar problem before and can to point out something obvious that I might have overlooked.
Thanks for taking the trouble to read this. Any advice would be very much appreciated.
I've faced some issues with InfoPath after Windows and/or SharePoint updates, so you should not rule out that as root cause of the problem. I would check for any known issues using the updates's name.
Regarding the DateTime format, is your custom code setting the DateTime value? If the answer is yes, make sure you are using the following format for the date.
infoPathField.SetValue(dateFieldItem.ToString("yyyy-MM-dd"));
One other thing, can you check the SharePoint LOGS and copy the exception stacktrace?
I am using dateLabeller in Cruise control .net for labeling purpose.
<labeller type="dateLabeller">
</labeller>
it is working fine for me, each time build label is incrementing every time.
But i also want to add some text before date so i have use following code
<labeller type="dateLabeller">
<yearFormat>QAT-0000</yearFormat>
<revisionFormat>0000</revisionFormat>
</labeller>
Now each time a fore build is trigger same label is generating.
How can i fix this problem
Thanks in advance.
Use the format values just as you would use them in Int32.ToString(String). Find information on Custom Numeric Format Strings here.
So this should fix it:
<labeller type="dateLabeller">
<yearFormat>'QAT-'0000</yearFormat>
</labeller>
Update: I took a look at the sources and found out that dateLabeller isn't capable of processing non-numeric labels since the label of the last successful integration is parsed into a System.Version object.
I m trying to query a wsdl by using the ?wsdl in the URL. I m able to get the complete WSDL. but the WSDL contains xsd imports with schemalocation like so
"xsd:import namespace="httx://xxxxxxxx/fundTransfer" schemaLocation="../xxx/xxxxxx/FundTransfer.xsd"/>"
How can i query the FundTransfer.xsd from the URL.
I was in the same boat as you earlier and I realized it is not possible at least with Axis 1.4. This was 1+ years back though. It might be different for different soap stacks like CXF etc. It is better to post in the forum of the soap stack vendor you are using as there is no standard defined for this.